views:

102

answers:

1

I have a web service that calls another web service that uses session state. Now I am rewriting the web service and making it WCF. I am having some confusion on how to call my web service from my wcf service.

Here is the code as it exists now:

    [WebMethod(EnableSession = true]
public string MyWebServiceCall()
{
 string result;
 MyOtherWebService.MyOtherWebService C = new MyOtherWebService.MyOtherWebService();
 C.CookieContainer = GetCookieContainer();
 result = C.GetResult();
 Session[_codingBookSession] = C.CookieContainer;
 return result;
}
+1  A: 

you can find information about working with sessions in WCF in this MSDN article:
http://msdn.microsoft.com/en-us/library/ms733040.aspx

In Windows Communication Foundation (WCF) applications, a session correlates a group of messages into a conversation. WCF sessions are different than the session object available in ASP.NET applications, support different behaviors, and are controlled in different ways. This topic describes the features that sessions enable in WCF applications and how to use them.

Joel Martinez
is it possible to show me what the code would look like to replace the method listed?
zachary