468,291 Members | 1,409 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,291 developers. It's quick & easy.

Enable Session state not working.

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?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------
Nov 23 '05 #1
2 5073
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.
"Ken Varn" wrote:
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?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 23 '05 #2
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.

"Ken Varn" <nospam> wrote in message
news:ev**************@TK2MSFTNGP15.phx.gbl...
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?

--
-----------------------------------
Ken Varn
Senior Software Engineer
Diebold Inc.

EmailID = varnk
Domain = Diebold.com
-----------------------------------

Nov 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Daniel | last post: by
5 posts views Thread by Sean | last post: by
5 posts views Thread by Steven Blair | last post: by
8 posts views Thread by Andrew Teece | last post: by
5 posts views Thread by =?Utf-8?B?QWxla3MgS2xleW4=?= | last post: by
2 posts views Thread by StanB | last post: by
reply views Thread by kpg* | last post: by
5 posts views Thread by =?Utf-8?B?QmlsbHkgWmhhbmc=?= | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.