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?
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With