Windows version: Windows 7 SP1 (client and server machines)
I seem to have a problem setting a web proxy. I am using the sample SDK 'Exception Reporting\\5 Secured Proxy' that comes with the SmartAssembly installer and have created a test harness that throws a generic exception. The proxy server I am using is FreeProxy (http://www.handcraftedsoftware.org/) and is hosted on another machine that is connected to the Internet. My dev machine is temporarily not connected to the Internet by setting the gateway address to nothing.
If I use the Windows Internet Options to use a http proxy set to the FreeProxy server, SmartAssembly can send the error report. This works no matter if I set the address, username and password in the SDK example when the proxy is set through Internet Options.
If Internet Options is not configured, and I set the proxy address, username and password in the SDK example only, SmartAssembly fails to send with a the error: 'ERR 2001: The remote name could not be resolved "sawebservice.red-gate.com".
The piece of code that sets the proxy in the sample is:
- Code: Select all
WebProxy webProxy = new WebProxy(proxy.Text);
if (userName.Text.Length > 0)
webProxy.Credentials = new NetworkCredential(userName.Text, password.Text);
I have another application which use a WebClient to download some data, and it also uses a a WebProxy object in exactly the same way as the SmartAssembly sample. This works fine with FreeProxy.
Does anyone have any ideas?