Options

Setting a http proxy

marcbeemarcbee Posts: 3
edited July 3, 2012 5:18PM in SmartAssembly
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:
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

  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Thanks for your message. Can I first double check--is the "I want to use a web proxy server" box ticked in the SmartAssembly UI (under Tools>Options)?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Options
    It wasn't ticked, but I did set it up. As far as I know the web proxy in the SmartAssembly UI is used for retrieving error reports. This did work for retrieving reports through FreeProxy, but generating a error report still failed when using the sample code.
  • Options
    Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hello,

    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?


Sign In or Register to comment.