title: How to monitor a .Net server application for fatal exceptions?
body: <p>I am developing a .Net server application, which is supposed to run continously. I would like to have a notification email sent each time the server process is terminated for any reason. Ideally the email should contain the exception message and stacktrace if an exception caused the termination. I am aware that certain exceptions can not be caught, such as <code>StackOverflowException</code>. So how would you log / send notification that a <code>StackOverflowException</code> occured in the server process?</p>
  
  <p>I am thinking along the lines of creating a second process to monitor the server process. But how would that get the details of the exceptions occuring?</p>