1

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?

2 Answers 2

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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;

4 Comments

I think I am doing that already, but since I don't need to use a proxy to connect to the website, there is no way for me to know if I am setting up that property correctly. I'd like to set up a scenario where I must use a proxy in order to connect to the website. That way I will see with my own eyes whether the HttpRequests works with proxies or not.
I don't quite understand your requirement. If you want your HTTP requests to go through a proxy server you should set the Proxy property. If you just want to see the HTTP data being exchanged without any proxy you could simply enable tracing: msdn.microsoft.com/en-us/library/ty48b824.aspx
I understand that part. The application works 2 ways: with proxies and without proxies. I have confirmed that it works fine when no proxies are required. I have not confirmed that it works fine when proxies are required. I only have the user's testimonial that it doesn't work. So I want to test to make sure the application works when proxies are required. But I don't know how to test this functionality because I don't have a proxy for which I must provide a username and password before I can connect to the website. I'd like to know how to set up a proxy that I can use for testing purposes.
Alright, then simply install Fiddler and then configure the Proxy property on your request to http://localhost:8888 which is the default port on which Fiddler opens a proxy server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.