.net UPS GetRate()配送服务器错误日志

dhxwm5r4  于 2023-01-10  发布在  .NET
关注(0)|答案(2)|浏览(129)

有人能用简单的英语解释这个错误吗?我在服务器应用程序日志中看到了以下错误,但不确定错误发生的确切位置。它引用的库是.NET Shipping库http://dotnetshipping.codeplex.com/releases/view/5241

Event Type: Error

Event Source:   .NET Runtime

Description:
Application: w3wp.exe Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: 
System.Net.WebException
Stack:
at System.Net.HttpWebRequest.GetResponse() 
at dotNETShipping.ShippingProviders.UPSProvider.GetRates()
at System.Threading.ExecutionContext.runTryCode(System.Object)
at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode, CleanupCode, System.Object)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) 
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
at System.Threading.ThreadHelper.ThreadStart()
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
o4hqfura

o4hqfura1#

The process was terminated due to an unhandled exception.表示您触发了一个try/catch语句未捕获的错误。从事件来看,这是在HttpWebRequest对象中发生的错误。
尝试将语句 Package 在try/catch中,特别是捕获WebExeception。

try
{
    ...
} 
catch (WebException wex)
{
    //add logging statements here. 
}
catch(Exception ex)
{
   //add more logging here 
}

我建议您在开始时尽可能地转储有关Web异常的所有内容,然后根据返回的信息更正问题并将日志记录减少到适当的部署级别。

polhcujo

polhcujo2#

您是否正在使用.Net Shipping库?上面的异常堆栈跟踪显示dotNETShipping.ShippingProviders.UPSProvider.GetRates()方法中发生异常。如果您只是将该库用作第三方库,则需要向库的维护人员报告错误。

相关问题