I have an asp.net application and webservices (asmx) which are in the same application but not in the same aspx file folder. I also have a winform application that uses web services. I tagged the webservice methods with [WebMethod (EnableSession = true)], but I cannot use the same session values that are in the application in web services. The winform application has access to the sessionID from the application, and I use the following code
Uri uri = new Uri(ServerServiceUrl);
_cookieContainer = new CookieContainer();
_cookieContainer.Add(new Cookie("ASP.NET_SessionId", SessionID, "/", uri.Host));
My question is: is there something I am missing or something is wrong that I cannot access the sessioin application from web services?
source
share