I am trying to achieve something that should be simple according to everything I have read, but is just not working for me: send any request through a proxy.
Please see the code below; it works as long as the 2 lines are commented out. Once I put them back in and try to use any proxy the request constantly times out throwing an "Unable to connect to the remote server" WebException, inner exception message "A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond xxx.xxx.xxx.xxx:zzzz".
http://www.ip-adress.com/Proxy_Checker/ is used to get a list of test proxies.
var request = (HttpWebRequest) WebRequest.Create("http://google.com/");
//var myproxy = new WebProxy("http://xxx.xxx.xxx.xxx:zzzz", false);
//request.Proxy = myproxy;
request.Method = "GET";
var response = (HttpWebResponse) request.GetResponse();
I am obviously missing something, and all similar questions I found either have more intricate issues or have been left unanswered.
Thanks.