-
WebClient .net 2.0
When I use WebClient to download a file, it bypasses the cookies. I need to download files from a site that I am logged in to. When I download the file, it says that I'm not logged in, even though I am. So, I assume that its bypassing the cookies.
How can I force WebClient to use the cookies?
-
Re: WebClient .net 2.0
use HttpWebRequest / HttpWebResponse
you can add cookies, use all the methods such as GET POST etc...
-
Re: WebClient .net 2.0
Would you have an example? I'm looking in MSDN but cant find any examples.
-
Re: WebClient .net 2.0
take a look @ this article on the codeproject, it describes how to use HttpWebRequest to authenticate with msn messenger / shows you how to set parameters like adding cookies to the Header.
Link to Article :)