3

I have the following code in my web.config...

  <system.webServer>
    <modules>
      <remove name="FormsAuthentication" />
    </modules>

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

    <validation validateIntegratedModeConfiguration="false" />
  </system.webServer>

I have a page where I allow a user to upload up to five images. In testing this, I am attempting to upload five images, totalling ~16MB and I'm getting the maximum request length exceeded error. Is there something else I need to set?

Randy Minder
  • 47,200
  • 49
  • 204
  • 358
  • 2
    check this: http://stackoverflow.com/questions/3853767/maximum-request-length-exceeded, seems duplicate – Gene R Feb 06 '16 at 14:23

1 Answers1

4

Try:

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="1073741824" />
    </system.web>
    <system.webServer>
       <!-- Your other settings -->
    </system.webServer>
</configuration>

In addition to what you have set. You probably also want to look at the executiontimeout (also a property of httpRuntime).

NikolaiDante
  • 18,469
  • 14
  • 77
  • 117