Setting a http proxy
marcbee
Posts: 3
SmartAssembly version: 6.7.0.239
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:
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?
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:
WebProxy webProxy = new WebProxy(proxy.Text); if (userName.Text.Length > 0) webProxy.Credentials = new NetworkCredential(userName.Text, password.Text); unhandledExceptionHandler.SetProxy(webProxy);
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?
Comments
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Yes, the proxy that you set up within SmartAssembly specifies how SmartAssembly itself will connect to the web service, but not exactly how your error reports will send out (though users can specify this through the Secured Proxy SDK exception reporting form).
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?