WebClient DownloadFile over ssl / https

G

gavkel

Can anyone get this to work? All Im getting is the login html being
downloaded.

Would appreciate any help - my heads hurts

Thanks
Gav
 
G

gavkel

Hi Greg

Heres my basic code...

Uri uri = new
Uri("https://www.scoobydoo.com/downloads/velma_statistics.csv");
WebClient webClient = new WebClient();

CredentialCache mycache = new CredentialCache();
mycache.Add(new Uri("https://www.scoobydoo.com/home.html"),

"Basic", new NetworkCredential("scoobydoobydoo", "Passw0rd"));
webClient.Credentials = mycache;

webClient.DownloadFile(uri, @"c:\gav.txt");


Now, whats happening is Im trying to download velma_statistics.csv but
its over HTTPS. I can see whats happening - when I copy and paste the
contents of the downloaded gav.txt into a html page in VS, I get the
login page that I would need to firstly complete in IE before
successfully downloading my csv file, again manually.

So, any ideas?

Thanks
 

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