HTTPREsponse.Cookies

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
 
J

Joerg Jooss

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,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top