One of our .NET 2.0 application started to just randomly disappear. There are no records in the Event log, Dr. Watson doesn't generate crash dump, no nothing...
How to troubleshoot this application?
1) Attach an event handler to AppDomain.UnhandledException event and log the exception object.
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
2) Attach a thread exception handler
Application.ThreadException +=
new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
For WPF and Silverlight apps you use more exception handlers, e.g. Application.DispatcherUnhandledException and Application.UnhandledException respectively, but these are not of interest to you in this scenario. I include them for completeness.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With