title: Download a file from sharepoint returns bigger file size
body: <p>I try to download a file from sharepoint using below method in my ASP.NET Project (C#).
  It always return a bigger file size and sometimes it returns corrupted file.
  What's wrong with it . I try so many ContentType but still the same.
  It must prompt user the download dialog.</p>
  
  <pre><code>           //file is SPFile
              response.Buffer = true;
              response.ClearContent();
              response.ClearHeaders();
              response.ContentType = "application/octet-stream";
              //response.ContentType = "application/force-download";
              response.AddHeader("content-disposition", "attachment; filename= \"" + FileName + "\"");
              response.Cache.SetCacheability(HttpCacheability.Private);
              if (file.Length != 0)
              {
                  response.BinaryWrite(file.OpenBinary());
              }
              response.Flush();
  </code></pre>
  
  <p>Thanks in advance.</p>