ASPX page does not render PDF in IE7 and Chrome on Windows XP
===

I have an .aspx page that returns a PDF.  Below is the code on Page_PreRender.

    Protected Sub Page_PreRender(sender As Object, e As System.EventArgs) Handles Me.PreRender

        Dim pdfStream As MemoryStream
        pdfStream = CType(Cache("PdfViewerContent"), MemoryStream)

        Response.BufferOutput = True
        Response.ClearContent()
        Response.ClearHeaders()
        Response.AddHeader("Cache-control", "no-store")
        Response.ContentType = "application/pdf"
        Response.AddHeader("Content-Length", pdfStream.Length.ToString())
        Response.AddHeader("Content-Disposition", "attachment=PDFFile.pdf")
        Response.BinaryWrite(pdfStream.ToArray())
        Response.Flush()
        HttpContext.Current.ApplicationInstance.CompleteRequest()

    End Sub
    

This page is launched from a window.open javascript call.

This works fine on Windows 7 with IE9, Chrome, and Firefox.  However, on Windows XP running IE7, the browser just flickers and no window is opened. (Popup Blocker is disabled)  With Chrome I get an error in developer console "Resource Interpreted as Document but transferred with MIME type application/pdf" and the page is downloaded as a file.