title: Thread.Abort in ASP.NET app causes w3wp.exe to crash
body: <p>Please <strong>do not set duplicate flag on this qustion</strong> - it is not about "why ThreadAbortException occurs", it is about "why w3wp.exe process terminates after ThreadAbortException".</p>
  
  <p>Let's say we have simple web application with following code sample:</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      Response.Redirect("http://google.com");
  }
  </code></pre>
  
  <p>Which by fact means something like (see <a href="https://stackoverflow.com/questions/1087777/is-response-end-considered-harmful">Is Response.End() considered harmful?</a>):</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
  {
      ...response write some data...
      System.Threading.Thread.CurrentThread.Abort();
  }
  </code></pre>
  
  <p>On my machine (Windows 10 Pro + IIS) this code leads to IIS pool process termination with error code 0x0 (redirect not performs). On other machines (which is NOT Windows 10) this code only generates ThreadAborted exception, but process continue working (redirect performs). </p>
  
  <p>Can someone check this sample and explain what is going on?</p>
  
  <p><strong>UPDATE</strong>
  Here some windows event logs related to this issue. </p>
  
  <p><strong>log #1</strong></p>
  
  <blockquote>
    <p>An unhandled exception occurred and the process was terminated.</p>
    
    <p>Application ID: /LM/W3SVC/1/ROOT/AS</p>
    
    <p>Process ID: 6700</p>
    
    <p>Exception: System.Threading.ThreadAbortException</p>
    
    <p>Message: Thread was being aborted.</p>
    
    <p>StackTrace:    at
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context)    at
    System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData,
    Int32 flags)    at
    System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr
    rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData,
    Int32 flags)</p>
  </blockquote>
  
  <p><strong>log #2</strong></p>
  
  <pre><code>Faulting application name: w3wp.exe, version: 10.0.10240.16384, time stamp: 0x559f3dad
  Faulting module name: KERNELBASE.dll, version: 10.0.10240.16384, time stamp: 0x559f3b2a
  Exception code: 0xe0434352
  Fault offset: 0x000b3e28
  Faulting process id: 0x1a2c
  Faulting application start time: 0x01d0e4b1b3ed01cb
  Faulting application path: C:\WINDOWS\SysWOW64\inetsrv\w3wp.exe
  Faulting module path: C:\WINDOWS\SYSTEM32\KERNELBASE.dll
  Report Id: 23b5298d-3b36-49c7-a294-de9c864b703f
  Faulting package full name: 
  Faulting package-relative application ID: 
  </code></pre>