Page not found 404 error in IIS 7 when uploading big file size

I struggled with one issue for hours, before realizing that IIS7 was the culprit. Even though maxrequestlength was set to 1GB in httpclientrequest (web.config) and executiontimeout was set to 600 seconds, for a larger file it would keep failing. Firebug was throwing a “404 not found” error for the handler.ashx!

IS has a security feature called requestFiltering, which is to prevent denial of service attacks. It sets the file size to 30MB maximum by default.
To change it, add the following to youor system.webServer section of web.config


   <security>
      <requestFiltering>
        <requestLimits maxAllowedContentLength="2147480000"/>
      </requestFiltering>
</security>	     
             

Here maxAllowedContentLength is set to 2 GB approx.

Share