Where do I catch and handle maxAllowedContentLength exceeded in IIS7?
I have an aspx page where I’m allowing a user to upload a file and I want to cap the max file upload size to be 10MB. IIS7, .NET 3.5. I have the following configured in my web.config file: <location path="foo.aspx"> <system.web> <!-- maxRequestLength: kbytes, executionTimeout:seconds --> <httpRuntime maxRequestLength="10240" executionTimeout="120" /> <authorization> <allow roles="customRole"/> <!-- Deny everyone else --> <deny users="*"/> </authorization> </system.web> <system.webServer> <security> <requestFiltering> <!-- maxAllowedContentLength: bytes --> <requestLimits