How can I set up .Net unhanlded exception handling in a windows service?
- by Mike Pateras
protected override void OnStart(string[] args)
{
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException);
Thread.Sleep(10000);
throw new Exception();
}
void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
}
I attached a debugger to the…