Situation:
I have an application that uses http connections extensively (stream ripping app) and it is supposed to work 24/7. And it does.
However, occasionally, it crashes with runtime error that is uncaught anywhere, and dumps following to the event log:
Event Type: Error
Event Source: .NET Runtime 2.0 Error Reporting
Event Category: None
Event ID: 5000
Date: 13.10.2010
Time: 11:02:30
User: N/A
Computer: STREAM01
Description:
EventType clr20r3, P1 streamsink.exe, P2 1.0.0.42484, P3 4c880fd9, P4 mscorlib, P5 2.0.0.0, P6 4add54dc, P7 344a, P8 21c, P9 system.io.ioexception, P10 NIL.
My question is: how to know what line of code caused the crash. I am deploying .PDBs with the binaries, but... What to do?
Target is WIndows XP, Framework is 2.0
EDIT:
I have this already implemented:
static public void InitializeExceptionHandler(string AppName) {
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
AppDomain currentDomain = AppDomain.CurrentDomain;
currentDomain.UnhandledException+=new UnhandledExceptionEventHandler(currentDomain_UnhandledException);
_appName=AppName;
}
No, it doesn't work!