[SOLVED] maxAllowedContentLength do not work for IHttpHandler IIS7

Issue

I have ASP.NET IHttpHandler module which handle file uploads. I set file size limit to 50mb in config file

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

But still get error while uploading 13mb file.

System.Web.HttpException (0x80004005): Maximum request length exceeded.

How to increase default allowed file size?

Solution

Use the following under the in web.config of web application

<httpRuntime maxRequestLength="52428800" />

Answered By – Mansoor Gee

Answer Checked By – Senaida (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *