Unhandled exceptions in ASP.NET on Secondary Thread
<pre><code>public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ThreadPool.QueueUserWorkItem(new WaitCallback(ABC));          


    }

    public static void ABC(object state)
    {
        System.Threading.Thread.Sleep(5000);
        throw new Exception();

    }
}
</code></pre>

<p>As you can see in the code above, I am creating a thread and throwing an exception in secondary thread. This causes the worker process to crash and start a new instance.</p>

<p>Is there a way to handled all the exceptions that can occur on a secondary thread ?</p>

<p>There are various articles that talk about handling exceptions from secondary thread but none suggest that you can actually stop the application from crashing. Does it mean that if one has not handled an exception in a secondary thread, there is no way to prevent the application from crashing ?</p>
