I want to download file using a proxy connection. My example code is:
WebClient client = new WebClient();
WebProxy wp = new WebProxy("url_proxy_server");
//wp.Credentials = new NetworkCredential("id", "pass", "domain");
client.Proxy = wp;
client.DownloadFile("http:mylink", "Save Path");
Is this a correct mode to download? How i can set port number?
Using the other constructor (String, Int32)
WebProxy wp = new WebProxy("http://contoso", 80);http://msdn.microsoft.com/en-us/library/xfsh37cx.aspx