tags:

views:

797

answers:

1

On the production server, I can see event from system Event Viewer when an asp.net app crash:

*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.*

it belongs to ".NET Runtime 2.0 Error Reporting" category.

but I can't find a event which belongs to "ASP.NET 2.0.50727.0" which can give me this exception a detail view:

*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

I can find these two event on my dev machine, because of Visual Studio installing? If so, how can I disable this so I can emulate production environment?

Great thanks and best regards, Fan

+3  A: 

Sometimes you may see the following scary error in "Windows Event Log":
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.
As you can see it is not clear and without any stack trace and you don’t have any idea about P1,…, P10 and any numbers. You know which the worst part of that is; the only thing that make you not to sleep and make you wish if it wasn’t in the log, yes! The “dp.ui” message.

Cause:
Ok, besides of all jokes and wishes, the exception “system.stackoverflowexception” will be raised when an infinitive loop or method calling happen, so you should check all sources for any recursive method calling and you could fire up the VS to debug that. But it is not possible and applicable all the time even if your application is not enterprise. So you have to google for P1,..,P10. I did it instead of you, so just sit back and relax!
P1: application name that has occurred this error, P2: application version, P3: application time stamp
P4: Assembly/Module name, P5: Assembly/Module version, P6: Assembly/Module timestamp
P7: MethodDef, P8: IL offset, P9: exception name (hashed because the name is too long)

Resolution
It’s pretty obvious that we need to find P7, P8. “IL Disassembler” determines them. That is a tool of VS.Net. Now:
1-execute IL Disassembler, and open your library
2-menu: view -> MetaInfo ->Show!, page much attention to the check list of the menu! especialy Raw check boxes
3-A dialogue box will be appeared, search for combination 06000 with 62e and you will see the MethodName of the class and by looking up you will see the first TypeDef which declare the class. And that all!
4-As you go to your application you may see a recursive calling and you should check the condition that makes this loop exit!
In windows and service application this exception maybe likes the following and you should check “sib.infobase.workflow.services.exe” by “IL Disassembler”:
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.
If you surf in the net you may see a solution like Microsoft has prepared:
support.microsoft.com/kb/911816 , but it may be don’t work properly for this exception.

References:
www.netframeworkdev.com/common-language-runtime/clr20r3-from-a-windows-service-calling-a-dot-net-dll-32830.shtml
http://social.msdn.microsoft.com/Forums/en-US/netfxtoolsdev/thread/ec36eff9-ac9f-46da-afa1-92be489d6a56

Daniel Bahmani
Thanks a lot!!!
Weixiao.Fan