Pages

Sunday, September 28, 2008

System.Web.HttpException: Maximum request length exceeded.

If you recently got following error when calling any method to upload loan package to server:

System.Web.HttpException: Maximum request length exceeded.

This is because the default maximum HTTP request if not set is 4MB (4096). If you want to upload more than that, you must modify element
in section

<snip>
   <system.web>
      ...
      <httpruntime maxrequestlength="[maximum length (ex: 15360 = 15(MB) x 1024]">
         ...
      </httpruntime>
   </system.web>
</snip>


On machine.config if you want all your applications on IIS have the same configuration.
Or on
web.config if you want only the modified application is affected by the new policy.

No comments: