title: .NET MVC3 Can't upload large files via FileUpload
body: <p>I need a way to upload large files (50+ MB) in my .net mvc3 website (hosted on Amazon). After trying to upload a large zip file (36.9MB) FireFox shows "The connection was reset" screen and FireBug shows "Aborted" under status.</p>
  
  <p>Any ideas on how I could solve it?</p>
  
  <p><strong>Controller:</strong></p>
  
  <pre><code>private void SaveFile(HttpPostedFileBase uploadedFile)
  {
      using (var file = System.IO.File.Create(Server.MapPath("/uploads/" + uploadedFile.FileName))
          uploadedFile.InputStream.CopyTo(file);
  }
  </code></pre>
  
  <p><strong>Web.config:</strong></p>
  
  <pre><code>  &lt;system.web&gt;
      &lt;httpRuntime maxRequestLength="56320" executionTimeout="1500"/&gt;
  &lt;/system.web&gt;
  
    &lt;system.webServer&gt;
      &lt;security&gt;
        &lt;requestFiltering&gt;
          &lt;requestLimits maxAllowedContentLength= "10485760"/&gt;
        &lt;/requestFiltering&gt;
      &lt;/security&gt;
    &lt;/system.webServer&gt;
  </code></pre>