Access Local Cookies with CookieContainer?

  • Thread starter Thread starter Arne Schittenhelm
  • Start date Start date
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?
 
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.
 
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,
 
Back
Top