title: ASP .Net File Upload Maximum request length exceeded error
body: <p>I have a simple ASP .Net file upload control on a page. I have following web.config settings</p>
  
  <pre><code>&lt;system.webServer&gt;
        &lt;security&gt;
        &lt;requestFiltering&gt;
          &lt;requestLimits maxAllowedContentLength="524288000" /&gt;
        &lt;/requestFiltering&gt;
      &lt;/security&gt;
   &lt;/system.webServer&gt;
  
      &lt;system.web&gt;
        &lt;httpRuntime maxRequestLength="524288" executionTimeout="120000" /&gt;
      &lt;/system.web&gt;
  </code></pre>
  
  <p>I am using IIS 7.5 on my dev box and IIS 7 on web server.</p>
  
  <p>If i upload file of size 7MB, it works fine.</p>
  
  <p>But when i upload file which is 10MB, it will throw following exception</p>
  
  <p>I have a simple ASP .Net file upload control on a page. I have following <code>web.config</code> settings</p>
  
  <pre><code>Exception Details: System.Web.HttpException: Maximum request length exceeded.
  
  Stack Trace:     
  
  [HttpException (0x80004005): Maximum request length exceeded.]
     System.Web.HttpRequest.GetEntireRawContent() +8772610
     System.Web.HttpRequest.GetMultipartContent() +62
     System.Web.HttpRequest.FillInFormCollection() +168
     System.Web.HttpRequest.get_Form() +68
     System.Web.TraceContext.InitRequest() +910
     System.Web.TraceContext.VerifyStart() +143
     System.Web.HttpApplication.AssignContext(HttpContext context) +118
     System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +464
  </code></pre>
  
  <p></p>
  
  <p>Any help would be highly appreciated. I know this question has been asked many times, but none of those solution worked for me.</p>
  
  <p>We are using Sitecore Content Management System.</p>