I've searched for a while, but can't seem to find anything that deals with the specific situation I'm facing.
I've set maxRequestLength to 5MB like so...
<httpRuntime maxRequestLength="5120"/>
and then I've set maxAllowedContentLength to 20MB...
<requestLimits maxAllowedContentLength="20971520"/>
For some reason though the lower limit is ignored. My application is allowing files up to 20MB to be uploaded.
It thought anything over maxRequestLength should trigger a .Net exception.
The application is classic ASP, with a custom Interop COM object managing the upload.
If I upload directly with .Net, the limits are respected, and the exceptions are thrown.
Does anyone know why maxRequestLength is ignored for ASP and/or COM?
This is happening in IIS 8 and IIS 10.
I have the following set, if it makes a difference...
<modules runAllManagedModulesForAllRequests="true"/>