John Smith
John Smith

Reputation: 4516

How do I set up a Web Proxy that I can use to test functionality related to Http Requests?

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

Answers (2)

Krumelur
Krumelur

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

Darin Dimitrov
Darin Dimitrov

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

Related Questions