When Maxrequestlength is exceeded an error page, "Internet Explorer cannot display the webpage", is displayed. I am trying to replace this with a more appropriate message. I read the other threads about FileUpload: these confirmed what I'd already found, that Try.... Catch doesn't help. So I've been exploring the use of code within the Application_Error event of Global.asax. I tried this code, in which I trapped the specific error and returned to the original error-causing page ("DOCS3") with a query string to cause it to display a message: -
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
Dim appException As System.Exception = Server.GetLastError()
...
Go to the complete details ...