title: ASP.NET MVC: how to return a file from a stream
body: <p>I'm trying to return a zipped file</p>
  
  <pre><code>public FileResult Download()
          {
                  MemoryStream outputStream = new MemoryStream();
  
                  using (ZipFile zip = new ZipFile())
                  {
                      zip.AddEntry("asdasd.html", "&lt;html&gt;fgdfg&lt;/html&gt;");
                      zip.AddEntry("asdassssd.html", "&lt;html&gt;asddsaf&lt;/html&gt;");
                      zip.Save(outputStream);
                  }
  
                 return File(outputStream, "application/zip", "file.zip");
  }
  </code></pre>
  
  <p>but in response it returns an error (in XML):</p>
  
  <blockquote>
    <blockquote>
      <p>XML Parsing Error: no element found Location:
      moz-nullprincipal:{122aa411-1418-43f5-b950-4347af7c7217} Line Number
      1, Column 1:</p>
    </blockquote>
  </blockquote>
  
  <p>What is wrong with my response (to zip files i use DotNetZip)? </p>