Question

I recently moved a .NET webforms site from an old IIS 6 over to IIS 7 and am now unable to upload file larger than 30MB.

All the web files are the same and so is the web.config:

<httpRuntime
          executionTimeout="36000"
          maxRequestLength="1024000"
          useFullyQualifiedRedirectUrl="false"
          minFreeThreads="8"
          minLocalRequestFreeThreads="4"
          appRequestQueueLimit="100" />

Additional info:

IIS 6 server was running on a physical dedicated machine. IIS 7 is running on AWS EC2, with much more memory (but I'm not using S3).

Was it helpful?

Solution

I think something changed in IIS 7 onwards for this limit value.. (don't ask why!) here is the new config:

<system.webServer>
    <security>
      <requestFiltering>
        <!-- this is in bytes (100 MB), not KB unlike maxRequestLength -->
        <requestLimits maxAllowedContentLength="104857600" />
      </requestFiltering>
    </security>
</system.webServer>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top