开发者

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 thi开发者_如何学编程s going?


You have to setup a cookie container in the client:

var cookieContainer = new System.Net.CookieContainer();
client.CookieContainer = cookieContainer;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜