For .NET Framework 2.0,There is a change in the behavior in which on any unhandled exception, .NET Framework 2.0 just ends the worker process. This exception cannot be caught as it is in the .Net framework 2.0, and when the .Net Framework "goes down", it also crashes the application. In .NET Framework 1.0 or 1.1, unhandled exceptions were ignored.
Workaround for this is :
Add this section in your app.config file.
<?xml version="1.0" encoding="utf-8" ?>
<legacyUnhandledExceptionPolicy enabled="true" />