HTTPREsponse.Cookies

  • Thread starter Thread starter James Dixon
  • Start date Start date
J

James Dixon

I am hitting a j2ee website that is using cookies to maintain session state.
In the headers, it has the syntax Set-Cookie:JSESSIONID=XXXXXXXXXXX
When I inspect the HTTPResponse.Cookies collection, it is not there
Does the cookie have to meet some other criteria other than set-cookie to be
put into that collection?

I didn't see an answer on any of the newsgroups or developer sites

Thanks
Jamie
 
James said:
I am hitting a j2ee website that is using cookies to maintain session
state. In the headers, it has the syntax
Set-Cookie:JSESSIONID=XXXXXXXXXXX
When I inspect the HTTPResponse.Cookies collection, it is not there
Does the cookie have to meet some other criteria other than
set-cookie to be put into that collection?

HttpResponse.Cookies is a server-side class, which you cannot use in this
context. I guess you mean HttpWebResponse? In this case, you need to
associate a CookieContainer instance with your HttpWebRequest instance. This
will allow you to track and manage cookies.

Cheers,
 
Back
Top