Good day,
I am using the following code to get the HTML from a web page. But I get a proxy authentication error.
How would I set up the proxy details (server, port, username and password) for our proxy server to get past it?
Any help would be appreciated
Thanks
I am using the following code to get the HTML from a web page. But I get a proxy authentication error.
How would I set up the proxy details (server, port, username and password) for our proxy server to get past it?
Code:
// Setup our Web request
System.Net.WebRequest request = System.Net.WebRequest.Create(pageUrl);
request.Timeout = timeoutSeconds * 1000;
// Retrieve data from request
response = request.GetResponse();
System.IO.Stream streamReceive = response.GetResponseStream();
System.Text.Encoding encoding = System.Text.Encoding.GetEncoding("utf-8");
System.IO.StreamReader streamRead = new System.IO.StreamReader( streamReceive, encoding);
// return the retrieved HTML
return streamRead.ReadToEnd();
Any help would be appreciated
Thanks