HttpWebRequest: showing page in browser

  • Thread starter Thread starter Alex
  • Start date Start date
A

Alex

Hi,

My case is simple: I use a httpwebrequest to authenticate to a web
site (using POST method) and I get the auth cookie in a
cookiecontainer. I can then re-use this cookie container to make
requests to protected areas of a web site. Now what if I want to open
one of these protected pages in an external browser (IE for instance),
is there a way to somehow share the cookie, write them on the disk,
etc.?

Any idea on how I can accomplish this?

Thank you very much,

Alex
 
Thus wrote Alex,
Hi,

My case is simple: I use a httpwebrequest to authenticate to a web
site (using POST method) and I get the auth cookie in a
cookiecontainer. I can then re-use this cookie container to make
requests to protected areas of a web site. Now what if I want to open
one of these protected pages in an external browser (IE for instance),
is there a way to somehow share the cookie, write them on the disk,
etc.?

Any idea on how I can accomplish this?

You could try and save the cookie to disk using P/Invoke. See InternetSetCookie()
or InternetSetCookieEx() in the Platform SDK for more details.

Cheers,
 
Back
Top