WCF: session data, server objects, and frustrations

I am new to WCF and have been dib-dabbing in different sections, but still haven't found what I ultimately want. I want to create a server: I have completed my server object together with my data contracts in the format:

public class SmartShopService : SmartShopInterface
{
        private Shopper sh;
        private List<ShoppingTripEvaluation> bestTrips;

        public SmartShopService() {
            sh = new Shopper();            
            bestTrips = new List<ShoppingTripEvaluation>();
        }

        // (Various methods go here)
}

The client is an ASP.NET page that looks like this:

public partial class Garfield : System.Web.UI.Page {

    static GarfieldService.SmartShopInterfaceClient client = new GarfieldService.SmartShopInterfaceClient();

    protected void Page_Load(object sender, EventArgs e) {

    }

    [WebMethod]
    public static bool SomeMethod() {
    }

    [WebMethod]
    public static bool SomeMethod2() {
    }
}

Now on this page are many forms. For example, suppose a client needs to find the fastest route between A and B. It stores all possible paths in the List variable on the server. Calculations are performed with one click of a button on the client. Then another button can display information (allows you to assume that it displays its fragments at a time - the user can choose to see the 25 best, 50 best, 100 best results, etc.).

, : A → server-side. B → B. A , B.

, , , , , , .

.

+3
1

- . - . - , WCF.

. WCF , Per Call, .

+3

All Articles