0

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?

Dimo
  • 3,238
  • 6
  • 29
  • 46
  • First, _nothing_ with computers is random. Second, is this coming from your code? Can you reproduce it on a test environment? Any sort of logging? – gunr2171 May 12 '14 at 17:19
  • Do you have a handler attached to `AppDomain.CurrentDomain.UnhandledException`? If not, see Hans Passant's comment to [this question](http://stackoverflow.com/questions/14711633/my-c-sharp-application-is-returning-0xe0434352-to-windows-task-scheduler-but-it). Once you have exception, amend your question with info from the exception. – LB2 May 12 '14 at 17:22
  • @LB2: Thanks will try that and Application_Error and edit the question with the logged exception. – Dimo May 12 '14 at 17:24

3 Answers3

1

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.

D Stanley
  • 149,601
  • 11
  • 178
  • 240
1

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.

Bura Chuhadar
  • 3,653
  • 1
  • 14
  • 17
0

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:

arserbin3
  • 6,010
  • 8
  • 36
  • 52