简体   繁体   中英

Communication between a Client -> WCF Service -> ASP.NET Webpage

i try to build a Client which sends data to a WCF Service. There is an ASP.NET Webpage which should recieve those information and put them in textfields etc.

Here is the method in my client:

 OutlookPluginService.BookingRequest breq = new OutlookClient.OutlookPluginService.BookingRequest();
            breq.subject = "This is my subject";
            breq.numParticipants = 6;

            client.getBookingURL("1234", breq);

This method sends the data to the WCF Webservice and recieves the ASP.NET URL.

This is my WCF Method:

 public string getBookingURL(string guid, BookingRequest request,string token,string exitURL)
{
    BookingRequest breq = new BookingRequest();

    HttpContext current = HttpContext.Current;
    string baseUrl = current.Request.Url.Scheme + "://"
        + current.Request.Url.Authority
        + current.Request.ApplicationPath.TrimEnd('/') + '/'
        + "WebPage/Booking/BBooking.aspx";
    return baseUrl;
}

i can access to the data from here but i dont know how to transfer the data to the asp.net Webpage.

is it possible to solve this problem with sessions?

thanks in advance for your help/ideas

you have two options;

1) you may use pooling, which makes calls to the related service in predetermined time intervals to fetch the newly added data.

or

2) you may use a pull - push structure which enables you to push data from your WCF service to your ASP.NET application. Refer to How do I implement a Push-Pull web application in C# asp.net

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM