How to catch maxrequestlength errors
-
Hello For the life of me I cannot find a way to catch maxrequestlength errors when, for excample, a form is posted back to the server containing a file upload that exceeds this limit. There *has* to be a way, but the error seems to occur before any server-side processing can occur. I've even tried setting up a global error page in IIS
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error.aspx" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>in web.config, but even this can't seem to catch this error in time. There has to be a simple solution to this common (?) problem... surely?
-
Hello For the life of me I cannot find a way to catch maxrequestlength errors when, for excample, a form is posted back to the server containing a file upload that exceeds this limit. There *has* to be a way, but the error seems to occur before any server-side processing can occur. I've even tried setting up a global error page in IIS
<system.webServer>
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error.aspx" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>in web.config, but even this can't seem to catch this error in time. There has to be a simple solution to this common (?) problem... surely?
-
See - I told you it was simple! :doh: