Reputation: 4516
one of the users of my applications must connect to a web proxy before he can connect to our website. he tells me that he keeps getting 401 errors even when he specifies the proxy's ip, port, username & password. I have no way to test this functionality because I don't need to use a proxy to connect to our website. For all I know the problem relates to the way I am making the HttpRequest, but again, I have no way to test this functionality.
How can I set up a web proxy that will allow me to test this functionality?
Upvotes: 1
Views: 2294
Reputation: 33048
Of you are on Windows, go grab CC Proxy http://www.youngzsoft.net/ccproxy/ and install it. It's free and and can be configured to your needs.
Upvotes: 2
Reputation: 1038730
You could assign the Proxy
property on the HttpWebRequest
.
For example here's how you could specify a proxy server using default network credentials:
var request = WebRequest.Create("http://www.google.com");
request.Proxy = new WebProxy("http://proxy.mydomain.com", 8080);
request.Proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
Upvotes: 0