Access Local Cookies with CookieContainer?

A

Arne Schittenhelm

Hello,

I try to figure out if there is a way to read the local cookies with
CookieContainer or another .net cookie class.

If I use a filename as URI I get a System.UriFormatException or
System.InvalidCastException.

Any ideas?
 
S

Scott Allen

Hi Arne:

You mean the local cookies stored as files on the hard drive? No, not
with CookieContainer. You could read them with as plain text files
with System.IO.StreamReader and parse out the information you need.
 
J

Joerg Jooss

Scott said:
Hi Arne:

You mean the local cookies stored as files on the hard drive? No, not
with CookieContainer. You could read them with as plain text files
with System.IO.StreamReader and parse out the information you need.

Or use P/Invoke to call InternetGetCookie() if you want to retrieve an IE
cookie.

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