I am trying to download some html from a homepage, and it works when i try to get the data from the http:// link, but if i try with the https:// link then it fails.
With the https link my files contains some string saying that i need to clear my cache and try again. (The string i get is in danish so posting it here is probably not helpful)
I am using this code.
static void TestDownloadHttpsArgs _args)
{
System.Net.WebClient myWebClient;
str content;
FileName outFile = @"C:\Temp\Result.fil";
str url = "somwdomain/somefile.htm";
;
new InteropPermission(InteropKind::ClrInterop).assert();
myWebClient = new System.Net.WebClient();
myWebClient.DownloadFile(url,outFile);
}
Does anyone have any idea how to fix the cashing problem?
I have tried changing caching settings in my internet explorer, but that seems to make no difference.