I'm developing a asp mvc applicaiton, and in the application I use the tpl.
I want to log all posssible exceptions of my application. After reading
the post , I found this sentence:
Hook up the unobservedtaskexception event (http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.unobservedtaskexception.aspx) to catch all exceptions (and send you and email).
I consider it to be best-practice to hook this event plus the Application_Error event plus the Thread.UnhandledException event.
Can anybody give a simple example to show how to use "taskscheduler.unobservedtaskexception event plus the Application_Error event plus the Thread.UnhandledException event" or give a clue?
wwuzhang
Member
131 Points
119 Posts
how to use Application_Error event plus the Thread.UnhandledException event?
Mar 02, 2012 03:31 AM|LINK
I'm developing a asp mvc applicaiton, and in the application I use the tpl.
I want to log all posssible exceptions of my application. After reading the post , I found this sentence:
Hook up the unobservedtaskexception event (http://msdn.microsoft.com/en-us/library/system.threading.tasks.taskscheduler.unobservedtaskexception.aspx) to catch all exceptions (and send you and email).
I consider it to be best-practice to hook this event plus the Application_Error event plus the Thread.UnhandledException event.
Can anybody give a simple example to show how to use "taskscheduler.unobservedtaskexception event plus the Application_Error event plus the Thread.UnhandledException event" or give a clue?
Thanks very much.