Geeks With Blogs

Tim Huffam Dotting the I and crossing the T of I.T.

Under .NET 2.0 an unhandled exceptions on a secondary thread now are no longer swallowed by the framework - instead they will shut the app down. 

However using the AppDomain.UnhandledException event will handle this - or you can revert to .NET 1.1 behavior by adding this line to your config: <legacyUnhandledExceptionPolicy enabled="1" />

You should now use a try/catch block on every thread entry method.  See this great doc on threading (page 12 inparticular).

Thanks to Matt and Jan for this

Posted on Wednesday, November 22, 2006 12:01 PM C# .NET , ASP.NET | Back to top


Comments on this post: Unhandled exceptions in secondary threads on .NET 2.0 will shut down the whole app.

# re: Unhandled exceptions in secondary threads on .NET 2.0 will shut down the whole app.
Requesting Gravatar...

Thanks, reading your recomende document i can fix the following issue:

"EventType clr20r3, P1 processinfostats.exe, P2 1.0.2599.23547, P3 45d0ba57, P4 processinfostats, P5 1.0.2599.23547, P6 45d0ba57, P7 46, P8 4a2, P9 pwwcfwobairllbcb4isg2auphnpgjup2, P10 NIL."

Best Regards.

Pepe
Left by Pepe on Feb 15, 2007 11:39 PM

Your comment:
 (will show your gravatar)


Copyright © Tim Huffam | Powered by: GeeksWithBlogs.net