HttpWebRequest: showing page in browser

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
 
J

Joerg Jooss

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,
 

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

Top