I want to download a certain file from a website. For that, I tried using this
WebProxy p = new WebProxy("192.168.10.254:8080", true);
p.Credentials = new NetworkCredential("username", "pwd");
WebRequest.DefaultWebProxy = p;
WebClient client = new WebClient();
string downloadString = client.DownloadString("myDowloadUrl");
Each time, I get this web exception
The remote server returned an error: (401) Unauthorized.
Any clues?
I'd recommend to keep it simple always. Try this