mercredi 21 octobre 2015

Authentication Needed When Downloading Using WebClient

I'm able to go to http://ift.tt/1GqOR3s, and click on "Download BSB" and proceed to download the following file: http://ift.tt/1LoVPoP$File/BSBDirectorySept15-234.csv

I'm trying to do this programatically as seen below however I get this error:

An unhandled exception of type 'System.Net.WebException' occurred in System.dll

Additional information: The remote server returned an error: (407) Proxy Authentication Required.

var client = new WebClient();
client.UseDefaultCredentials = true;
client.DownloadFile("http://ift.tt/1GqOSEG", @"C:\temp\csvTest.csv");




Aucun commentaire:

Enregistrer un commentaire