HttpWebRequest - How do I make a subsequent request?

  • Thread starter Thread starter Eria Tlov
  • Start date Start date
E

Eria Tlov

Ok, I hope this sounds basic.

I'm able to set up a HttpWebRequst to go to a site, post my form data,
successfully logon, and get the cookie passed.

Now how do I navigate to the page I want to go to on this site?
The address property of the WebRequest is read only.
If I create a new WebRequest I lose my cookie container and properties, and
the website response says "you have been automatically logged off, please
log in".

Any Ideas?
Thanks,
Eria
 
Well, I got something to work.
I create an HttpWebRequest with a cookie container, copy the session ID out
to a string, and then write that string into the headers of subsequent
request. By subsequent request, I mean creation of new HttpWebRequest. I
still haven't figured out if you can navigate with one request. It seems to
navigate with autoredirects to a page away from the RequestURI, but not
manually.
thanks,
Eria
 
Back
Top