I can't catch exception on windows services.
I've already tried the following:
AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(handlerMethod);
alone and in combination with:
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.ThrowException);
It doesn't even function with:
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
I've also tried:
Application.ThreadException += new ThreadExceptionEventHandler(handlerMethod);