Where is the .net framework error log location

Graviton picture Graviton · Aug 25, 2009 · Viewed 33.5k times · Source

My application exits for no reason, most likely due to errors in the profiler I used because it interferes with all the CLR runtime stuff. The issue is is there any file at any location where .Net framework logs these kind of errors?

Answer

Nader Shirazie picture Nader Shirazie · Aug 25, 2009

As David says, these errors go to the Application Log in the Windows Event Log.

If you're looking for a bit more information as your application is terminating, you can subscribe to the UnhandledException event. That way you will get an exception as your app terminates, and you can inspect the exception in the debugger, or log details to a file of your choosing, etc.

Note: you cannot "handle" the exception in the traditional sense, your app will die. It does however give you an opportunity to get some useful information on your way out :)