title: Downloading file using Asp.Net IHttpHandler gives different file property results
body: <p>I have written an IHttpHandler that extracts querystring parameters, and uses them to determine what type of file do send back.  In the handler I call:</p>
  
  <pre><code>private static void GetSegmentFile(HttpContext context)
  {
      byte[] file = GetFile();
      context.Response.ContentyType = "application/octet-stream";
      context.Response.BinaryWrite(file);
  }
  </code></pre>
  
  <p>On the browser side I get different results when trying to download the file (using right click > save as on a link in a web page web with it's href set to the file's URL).  using a test.docx these are my results:</p>
  
  <p>Chrome:  File has the original file name and file extension
  IE 11: File is renamed to <code>media</code> with the <code>.zip</code> file extension.</p>
  
  <p>I have attached an image to show what I mean.<img src="https://i.stack.imgur.com/mO4mF.png" alt="enter image description here"></p>