Reputation: 13335
My sharepoint webpart is throwing an error on my client's environment when calling HttpWebRequest.GetRequestStream (and he's using a proxy server). The error is "unable to connect to the remote server."
What's the best way to reproduce this scenario (hooking up a mock proxy) on my end so that my requests go out through the proxy server as well? This will help to debug...
Upvotes: 0
Views: 944
Reputation: 13750
You can configure a proxy server in the HttpWebRequest object. As well as specifying the server address you can add any bypass addresses.
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.proxy(v=VS.71).aspx
The proxy can also be specified in the config file. This may make it easier for you to test the solution.
http://msdn.microsoft.com/en-us/library/kd3cf2ex.aspx
Upvotes: 1