[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

David Boaz

1/6/2003 12:36:00 PM

my problem is:
I created a WS with EnableSession=true, for debuging proposes it return a
string representation of the session id. in hte default page VS generates,
now when i invoke the method twice, I recieve the same session id.
the problem started, when I created a winform project, I added a web
reference to the WS (proxy automticly generated). when I invoke theWS I
recive each time a diffrent session id. How can I save the state of the
program? I think that the server think that each invocation is by diffrent
client.
thanks, David.


1 Answer

Anubhav Mishra

1/6/2003 1:05:00 PM

0

If an XML Web service method uses session state, then a cookie is passed
back in the response headers to the XML Web service client that uniquely
identifies the session for that XML Web service client. In order for the XML
Web service client to receive that cookie, a new instance of CookieContainer
must be created and assigned to the CookieContainer property before calling
the XML Web service method. This will ensure that the cookie is properly
included in subsequent requests.

check this

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/c...
frlrfsystemwebservicesprotocolshttpwebclientprotocolclasscookiecontainertopi
c.asp


Hope this helps

Anubhav



"David Boaz" <dboaz@bgumail.bgu.ac.il> wrote in message
news:upnKViXtCHA.2332@TK2MSFTNGP12...
> my problem is:
> I created a WS with EnableSession=true, for debuging proposes it return a
> string representation of the session id. in hte default page VS generates,
> now when i invoke the method twice, I recieve the same session id.
> the problem started, when I created a winform project, I added a web
> reference to the WS (proxy automticly generated). when I invoke theWS I
> recive each time a diffrent session id. How can I save the state of the
> program? I think that the server think that each invocation is by diffrent
> client.
> thanks, David.
>
>