未处理的异常导致应用程序与日志中的"EventType clr20r3,P1 w3wp.exe"崩溃,但没有详细信息

C.C*_*.C. 12 .net windows asp.net crash

在生产服务器上,当ASP .NET应用程序崩溃时,我可以从系统事件查看器中看到此事件:

EventType clr20r3,P1 w3wp.exe,P2 6.0.3790.3959,P3 45d691cc,
P4 app_web_default.aspx.cdcab7d2,P5 0.0.0.0,P6 4b2e4bf0,P7 4,P8 4,P9
system.dividebyzeroexception,P10 NIL.*

它属于".NET Runtime 2.0错误报告"类别.

但我找不到属于"ASP.NET 2.0.50727.0"类别的事件,它可以给我这个例外这样的详细视图:

An unhandled exception occurred and the process was terminated.  
Application ID: /LM/W3SVC/505951206/Root  
Process ID: 1112  
Exception: System.DivideByZeroException  
Message: Attempted to divide by zero.  
StackTrace:    
   at _Default.Foo(Object state)  
   at System.Threading.ExecutionContext.runTryCode(Object userData)  
   at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)  
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)  
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)  
   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)  
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp
Run Code Online (Sandbox Code Playgroud)

我的dev机器上有第二个事件,是因为Visual Studio安装在那里?如果是这样,我如何禁用它以便我可以模拟生产环境?

Dan*_*l B 36

有时您可能会在Windows事件日志中看到这个可怕的错误:

EventType clr20r3,P1 w3wp.exe,P2 6.0.3790.3959,P3 45d6968e,P4 dp.ui,P5 3.9.7.55,P6 4b49a307,P7 62e,P8 0,P9 system.stackoverflowexception,P10 NIL.

你可以看到它不清楚,没有堆栈跟踪,你不知道P1,...,P10和任何数字.你知道哪个是最糟糕的部分; 如果它不在日志中,唯一让你不要睡觉并让你希望的东西,是的!"dp.ui"消息.

原因

好的,除了所有的笑话和愿望之外,当发生无限循环或方法调用时会引发异常"system.stackoverflowexception",所以你应该检查所有源的任何递归方法调用,你可以启动Visual Studi来调试它.但即使您的应用程序不是企业,它也不可能并且始终可行.所以你必须谷歌为P1,...,P10.我做了而不是你,所以只是高枕无忧!

P1:发生此错误的应用程序名称
P2:应用程序版本
P3:应用程序时间戳
P4:程序集/模块名称
P5:程序集/模块版本
P6:程序集/模块时间戳
P7:MethodDef
P8:IL偏移量
P9:异常名称(散列因为名字太长了)

解析度

很明显我们需要找到P7,P8.IL Disassembler是Visual Studio中的一个工具,它将帮助我们做到这一点.

  1. 执行IL反汇编程序,然后打开您的库.
  2. 菜单:查看 - > MetaInfo - >显示!,注意菜单的检查清单,特别是原始复选框.
  3. 将出现一个对话框,搜索组合06000,62e您将看到该类的MethodName,通过查找,您将看到第一个声明该类的TypeDef.就这样!

当你转到你的应用程序时,你可能会看到一个递归调用,你应该检查使这个循环退出的条件!

在Windows和服务应用程序中,此异常可能如下所示,您应该通过"IL Disassembler"检查"sib.infobase.workflow.services.exe":

EventType clr20r3,P1 sib.infobase.workflow.services,P2 1.0.2740.20114,P3 468a74f5,P4 sbpscs,P5 1.0.2740.20087,P6 468a74be,P7 1c,P8 120,P9 zxkyzcs5wacordmkttdkr1xouosi00fr,P10 NIL.

如果您在网上冲浪,您可能会看到像Microsoft已准备好的解决方案:http: //support.microsoft.com/kb/911816,但它可能无法正常处理此异常.

更多信息

查找错误报告桶参数的方法

  • 这非常有用,我在谷歌找到这些信息时遇到了很多麻烦.谢谢! (2认同)
  • @DanielBahmani:感谢Daniel提供有价值的信息.+1的答案很棒. (2认同)