I have a client experiencing our program closing with no error, nothing in Windows Event log, and need to find out why it's happening.
I've added event handlers for both ProcessExit and ApplicationExit, but neither get triggered:
AppDomain.CurrentDomain.ProcessExit += new EventHandler(OnApplicationExit);
Application.ApplicationExit += new EventHandler(OnApplicationExit);
This says to me the process is being terminated 'rudely' (apparently this is a term) by some part of the OS. Is there anyway I can figure out what is doing that?