Error submitting error report using Proxy
saint168
Posts: 12 Bronze 1
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.
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.
Comments
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 | Product Support Engineer | Redgate Software
Have you visited our Help Center?
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 | Product Support Engineer | Redgate Software
Have you visited our Help Center?
Jessica Ramos | Product Support Engineer | Redgate Software
Have you visited our Help Center?