title: iis7.5 Response.ContentType = "application/pdf" cause connection reset
body: <p>I'm using IIS to send a pdf document (generated by abcpdf 8) in classical asp.</p>
  
  <p>Nothing gets to the browser.</p>
  
  <ul>
  <li>FF: The connection was reset - The connection to the server was reset while the page was loading.</li>
  <li>IE: Internet Explorer cannot display the webpage - Internet Connectivity has been lost</li>
  <li>Chrome: This web page is not available - Error 101 (net::ERR_CONNECTION_RESET): The connection was reset.</li>
  </ul>
  
  <p>This is the code:</p>
  
  <pre><code>Set theDoc = CreateObject("ABCpdf8.Doc") 
  theDoc.FontSize = 96
  thedoc.AddText "Hello World"
  
  theData = theDoc.GetData()
  
  Response.ContentType = "application/pdf" '&lt;-- culprit?
  Response.AddHeader "content-length", UBound(theData) - LBound(theData) + 1
  Response.AddHeader "content-disposition", "inline; filename=MyPDF.PDF"
  Response.BinaryWrite theData        
  </code></pre>
  
  <p>If I comment out the ContentType line, the browser loads the binary data, but of course the data is displayed within the browser and is unreadable in this format.  </p>