I have tried to enable session state in my [WebMethod] tag, but it appears
to not be working. When my web service is called, the session state is not
preserved. The Web Service is being called from a Windows Form control
assembly. Is there anything else I need to do to have session state work in
my web service?

Signature
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.
EmailID = varnk
Domain = Diebold.com
-----------------------------------
Amit Wadhwa - 01 Feb 2005 15:37 GMT
Are u making a new web service object everytime you are calling a function.
or that is the same object.
if it is not the same object then evrytime an object is made a new session
is created.
> I have tried to enable session state in my [WebMethod] tag, but it appears
> to not be working. When my web service is called, the session state is not
> preserved. The Web Service is being called from a Windows Form control
> assembly. Is there anything else I need to do to have session state work in
> my web service?
Chris Botha - 01 Feb 2005 16:03 GMT
In addition to enable session state on the server side, you must create a
CookieContainer for the web service on the client side:
myService.CookieContainer = new CookieContainer()
By default the client does not process/support cookies, which are needed on
the server to determine the session ID.
If cookies in your browser is enabled, then running your web service in IE
should produce the expected results.
>I have tried to enable session state in my [WebMethod] tag, but it appears
> to not be working. When my web service is called, the session state is
[quoted text clipped - 3 lines]
> in
> my web service?