title: response.end() thread was being aborted exception is throw While generating pdf dynamically using ItextSharp
body: <p>I am generating pdf by itextsharp dynamically. But it throw exception 
   <strong>thread was being aborted exception</strong> at Response.End()</p>
  
  <p>I tried to call the HttpContext.Current.ApplicationInstance.CompleteRequest method instead of Response.End</p>
  
  <p>It is avoid my exception but <strong>popup is not coming for downloading pdf</strong> 
  and Popup for downloading pdf is working on localhost. but it is not working on online.</p>
  
  <p>I tried to remove try-catch block. but still it is not working solution.</p>
  
  <p>Here is my code</p>
  
  <hr>
  
  <pre><code>try
  {
  .
  .    
      pdfDoc.Close(); 
      Response.Clear();
      Response.Buffer = true; 
      Response.ContentType = "application/pdf";
      Response.AddHeader("content-disposition", "attachment;filename=xyz.pdf");
      Response.Cache.SetCacheability(HttpCacheability.NoCache);
      Response.Write(pdfDoc);
      //Response.End() //HERE ERROR IS Show. Control goes to Catch block.
      HttpContext.Current.ApplicationInstance.CompleteRequest();
  
  }
  catch(Exception ex)
  {
      ex.ToString();
  }
  </code></pre>