Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diagnosing CLR errors in Windows Event Viewer

We have an .NET desktop application that crashed in production. How do we diagnose the error? I'd like to know the type of exception that occurred, the error message, and the stack trace.

Because the exception wasn't handled by our code, we received the "This application has encountered a problem and needs to close" Windows message box. The only option was to close, there was no debug button.

This MSDN article suggested looking in the Windows Event registry. I checked there, and here's the information inside it:

Faulting application Initect.Server.UI.exe, version 0.12.9084.90, time stamp 0x49cac472, faulting module KERNEL32.dll, version 6.0.6001.18000, time stamp 0x4791a81d, exception code 0xe0434f4d, fault offset 0x0002f35f, process id 0x44c, application start time 0x01c9ada7f320cab0

How can this information tell me the exception type, the stack trace, and the error message?

like image 864
Judah Gabriel Himango Avatar asked Apr 02 '09 18:04

Judah Gabriel Himango


People also ask

How do I troubleshoot Windows logs?

In Windows, you can use the Diagnostics-Networking, WLAN-Autoconfig, and System logs to do advanced and focused troubleshooting. To find these logs, search for the Event Viewer. Alternatively, from the Control Panel, choose Administrative Tools and then Event Viewer.


1 Answers

That information isn't enough to get you a stack trace, exception type, error message, etc.

You can configure Windows Error Reporting (which showed you the problem & needs to close UI) on Windows Server 2008 to always collect a dump file that you can then debug. This doesn't require you to install Visual Studio or any other debugger in your production environment.

http://blogs.technet.com/askperf/archive/2008/02/05/ws2008-windows-error-reporting.aspx shows the proper registry settings to do this.

like image 110
Michael Avatar answered Oct 19 '22 17:10

Michael