Quote:"The remote server returned an error: (401) Unauthorized."
NetworkCredential credentials = new NetworkCredential(username, password); // Create a new WebClient object and set the credentials. WebClient webClient = new WebClient(); webClient.Credentials = credentials; String downloadAddress = xxx; webClient.Headers.Add("user-agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705;)"); Stream data = webClient.OpenRead(downloadAddress);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)