title: IE8 OpenWindow does not work when downloading a file
body: <p>I have a simple script  which opens an new window using javascript :</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
          window.open("/test/test.aspx", "", "", "");
  &lt;/script&gt;
  </code></pre>
  
  <p>This works great when dealing with normal webpages, but when I try to download pdf file using :</p>
  
  <pre><code>context.Response.ContentType = "application/pdf";
  context.Response.WriteFile(fileFullName); 
  </code></pre>
  
  <p>I can see the window opening but it closes directly afterwards. This behavior is only shown when not working in local, when accessing a different server.</p>
  
  <p>When using different browser thant IE8, there are no problem, the download works perfectly.</p>
  
  <p>I have for the moment find a work around opening a page with a link in it, so that the user click and access his download, but I do not like the solution so much.</p>
  
  <p>thanks for your inputs,</p>
  
  <p>[EDIT]
  Here is a simplified code  :</p>
  
  <p>page1 :</p>
  
  <pre><code>&lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head runat="server"&gt;
      &lt;title&gt;&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
      &lt;div&gt;
      &lt;script type="text/javascript"&gt;
          window.open("/page2.aspx", "", "", "");
  
      &lt;/script&gt;
  
      &lt;/div&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>page 2</p>
  
  <pre><code>protected void Page_Load(object sender, EventArgs e)
          {
              string fileFullName = ApplicationStoringPath.TempReportPath + "00329bad-28ac-46bd-9f0a-3eced660f079.pdf";
              string fileName = "test.pdf" ;
  
              if (File.Exists(fileFullName))
              {
                  FileStream file = File.Open(fileFullName, FileMode.Open);
                  long length = file.Length;
                  file.Dispose();
  
  
                  Response.AddHeader("Content-Disposition", string.Format("attachment; filename=\"{0}\"", fileName));
                  Response.AddHeader("Pragma", "public");
                  Response.AddHeader("Expires", "0");
                  Response.AddHeader("Cache-Control", "must-revalidate, post-check=0, pre-check=0");
                  Response.AddHeader("Content-Transfer-Encoding", "binary");
                  Response.AddHeader("Content-Length", length.ToString());
                  Response.ContentType = "application/pdf";
  
                  Response.WriteFile(fileFullName);
              }
          }
  </code></pre>
  
  <p>Here what happens :</p>
  
  <p>Accessing page 1 from local opens popup and proposes the download. (IE)
  Accessing page 2 from local proposes the download.(IE)</p>
  
  <p>Accessing page 1 from different PC opens popup and does not propose the download. (IE)
  Accessing page 2 from different PC proposes the download. (IE)</p>
  
  <p>Accessing page 1 from different PC opens popup and proposes the download. (FireFox)
  Accessing page 2 from different PC proposes the download. (FireFox)</p>
  
  <p>This is not some popup blocker situation. The file that I try to access is located in the temp folder of the site that host my pages, ie the same server.</p>
  
  <p>[EDIT]</p>