title: Why does thread crash w3wp.exe, but not a task?
body: <p>I expect that if I use a fire and forget Task in ASP.NET like below:</p>
  
  <pre><code>Task.Run(() =&gt; { throw new NullReferenceException(); });
  
  Thread.Sleep(100);
  GC.Collect();
  GC.WaitForPendingFinalizers();
  </code></pre>
  
  <p>and have the following in Web.config:</p>
  
  <pre><code>&lt;ThrowUnobservedTaskExceptions enabled="true"/&gt;
  </code></pre>
  
  <p>then I should crash the IIS worker process. However, it does not and I do not understand why. If I start a new thread, it indeed crashes the process:</p>
  
  <pre><code>    var thread = new Thread(() =&gt; { throw new NullReferenceException(); });
      thread.Start();
      Thread.Sleep(100);
  </code></pre>
  
  <p>Why is the Task not causing the process to crash?</p>