web service session works while debugging but not when its published
I'm finishing up my first web service. It stores data on a dataset that I later need to check up on, so I need to keep that information around.
I've already enabled the session in the web service's method "EnableSession = true"
[WebMethod(Description = "Receives status requests, as well as status udpates.", EnableSession = true)]
If I debug the web service everything works but if I try to use the application that sends the requests to the web service while it is published, the session keeps restarting again and again and again. Can anyone please tell me who do I have to kill to get this going?
You have to setup a cookie container in the client:
var cookieContainer = new System.Net.CookieContainer(); client.CookieContainer = cookieContainer;