Error submitting error report using Proxy

.NET obfuscator and automated error reporting

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

Error submitting error report using Proxy

Postby saint168 » Tue Apr 08, 2014 5:06 pm

I added the following code to the SmartAssemblyUI project:

if (ProxyAddress != "")
{
var proxy = new WebProxy(ProxyAddress);
proxy.UseDefaultCredentials = true;
this.unhandledExceptionHandler.SetProxy(proxy);
}

try
{
SendReport();
SendEmail();
}
catch
{
AddToEventLog(body.ToString());
}

However, I got: "ERR 2001L The request failed with HTTP status 407: Proxy Authentication Required..... " submitting the error report. The proxy server was working correctly on that machine when using IE.
saint168
 
Posts: 10
Joined: Thu Nov 01, 2012 9:24 pm

Postby jessica.ramos » Wed Apr 09, 2014 11:58 pm

Hi there!

Please bear with me as I'm not experienced in coding with proxies..

Can I check-- is this error while testing on your own machine? Could you do a test to see if manually setting the credentials to the default credentials instead of enabling UseDefaultCredentials makes any difference?

proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm

Postby saint168 » Thu Apr 10, 2014 12:31 am

I tested both ways and neither worked.
saint168
 
Posts: 10
Joined: Thu Nov 01, 2012 9:24 pm

Postby jessica.ramos » Fri Apr 11, 2014 9:55 pm

Hm okay, thanks for trying that.

I know it should essentially do the same thing as what you're doing in the code, but could you kindly try editing your app.exe.config file, or adding one for your application, that sets the useDefaultCredentials property to see if that gets things working?

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.net>
<defaultProxy useDefaultCredentials="true" />
</system.net>
</configuration>
Jessica Ramos
Technical Support
Red Gate Software Ltd.
jessica.ramos
 
Posts: 235
Joined: Mon Apr 23, 2012 1:13 pm

Postby saint168 » Mon Apr 14, 2014 9:52 pm

I was skeptical about this fix but it worked! Thank you.
saint168
 
Posts: 10
Joined: Thu Nov 01, 2012 9:24 pm

Postby jessica.ramos » Mon Apr 14, 2014 10:31 pm

That's great to hear--thanks for letting us know that helped! :)
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 0 guests