Take a look at the CookieContainer property on the HttpWebRequest. You
should be able to assign a new CookieContainer instance to it. Then, the
response should populate a cookie collection in the container. Just make
sure that you store a reference to the CookieContainer so that you can
assign it to the new request.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
<yo**@nobhillsoft.comwrote in message
news:11**********************@74g2000cwt.googlegro ups.com...
This sure helps! what would help more is if you can refer me to any
code sample where its done... do you have anything off the top of your
head... either the online help, an MSDN article or anything like that
where they talk about it? thanks!
Nicholas Paldino [.NET/C# MVP] wrote:
>What you need to do is in the response for the first request, there will
be cookies that are sent back. You need to include these cookies as part
of
your second request. One of these cookies has an identifier in it which
idenfies the session.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
<yo**@nobhillsoft.comwrote in message
news:11**********************@i3g2000cwc.googlegr oups.com...
Hi,
I am using HttpWebRequest to get the content of a web page. the call to
this web page is creating a session on the server. then, I wish to get
the content of a 2nd web page on the same site, but this 2nd web page
reads the session created on the 1st page. so when i call it with
HttpWebRequest, it lost the session. anybody has a tip or a code
snippet that shows me how do i make the server retain the session
between two HttpWebRequest calls?
thanks