Setting a http proxy

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Setting a http proxy

Postby marcbee » Wed Jun 27, 2012 9:31 am

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:

Code: Select all
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?
marcbee
 
Posts: 2
Joined: Wed Jun 27, 2012 9:27 am

Postby jessica.ramos » Thu Jun 28, 2012 5:40 pm

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
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm

Postby marcbee » Thu Jun 28, 2012 11:42 pm

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.
marcbee
 
Posts: 2
Joined: Wed Jun 27, 2012 9:27 am

Postby jessica.ramos » Tue Jul 03, 2012 10:18 pm

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
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 1 guest