Dimo
Dimo

Reputation: 3280

Random crashes in asp.net mvc, how to debug?

I get these random crashes on a production site. In the event viewer they look like this:

Faulting application name: w3wp.exe, version: 8.0.9200.16384, time stamp: 0x5010885f
Faulting module name: KERNELBASE.dll, version: 6.2.9200.16857, time stamp: 0x530e76e4
Exception code: 0xe0434352
Fault offset: 0x00010f22
Faulting process id: 0xde8
Faulting application start time: 0x01cf6df2fa8b9b5c
Faulting application path: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll
Report Id: 34425c37-d9f8-11e3-93f3-782bcb949b34
Faulting package full name: 
Faulting package-relative application ID: 

How can I debug this and find out the cause?

EDIT:

Added logging on "AppDomain.CurrentDomain.UnhandledException" and "Application_Error" but nothing comes up. ELMAH fails to log anything...Any suggestions?

Upvotes: 0

Views: 1156

Answers (3)

Bura Chuhadar
Bura Chuhadar

Reputation: 3751

I can suggest you to check debug diagnostic tool. You can definitely find your crash with that tool. Plus it is free. You just have to collect your dump files by using that tool and at the end it will show you the problematic code.

Upvotes: 1

arserbin3
arserbin3

Reputation: 6148

For MVC the easiest first step to logging exceptions is using Elmah. It can be installed as a nuget package and is pretty easy to setup. I strongly recommend using it on every MVC app you create.

Nuget package: http://www.nuget.org/packages/Elmah.MVC/2.1.1

Install-Package Elmah.MVC

Some older, but useful information is available here:

Upvotes: 0

D Stanley
D Stanley

Reputation: 152491

I believe that's the error you get when an unhandled exception occurs. If there's no further information in the event log, I would start by adding error handling in Application_Error as described here.

Upvotes: 1

Related Questions