Uploading docx corrupts file
<p>I am using the code below to upload a file.  The files upload without error, but when I open a file with a .docx extension M$ says that the file is corrupted.  It is able to repair the file and then open, however.  I'd like to fix this so the document opens correctly.</p>

<pre><code>string strExtension = Path.GetExtension(context.Request.Files[0].FileName).ToLower();
string fileName = @"C:\" + Guid.NewGuid().ToString() + strExtension;
using (FileStream fs = new FileStream(fileName, FileMode.CreateNew))
{
    byte[] bytes = new byte[16 * 1024];

    int bytesRead;
    while ((bytesRead = context.Request.InputStream.Read(bytes, 0, bytes.Length)) &gt; 0)
    {
        fs.Write(bytes, 0, bytesRead);
    }
} 
</code></pre>

<p>Thanks.</p>

<p>EDITED:</p>

<p>File saves correctly with this code:</p>

<pre><code>while ((bytesRead = context.Request.Files[0].InputStream.Read(bytes, 0, bytes.Length)) &gt; 0)
</code></pre>

<p>Also saves correctly with <code>context.Request.Files[0].SaveAs(...);</code></p>
