Maximum request length exceeded

If you are using IIS(Internet Information Services) for hosting your web application, then the default upload file size is 4 MB. To increase it, please copy following code in your web.config.

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1048576" />
    </system.web>
</configuration>

If you are using IIS7 or above version then add following code in your web.config

<system.webServer>
  <security>
     <requestFiltering>
        <requestLimits maxAllowedContentLength="1073741824" />
     </requestFiltering>
  </security>
</system.webServer>

 

 

Leave a Comment