Application_Error and Maximum request length exceeded

J

Jacky Kwok

Dear all:

I know how to use the "Application_Error" in "Global.asax" to catch the
exception and display my own error message page.

However, I found "Application_Error" cannot handle the error of "Maximum
request length exceeded" (in my case, actually too large upload file
size, I know how to modify the "maxRequestLength" to change the upload
size but I need a formal error message in this case).

In VS.NET debugger, program could run into the "Application_Error".
However, no matter I used the

<customErrors defaultRedirect="errorStatus.htm" mode="On"> </customErrors>

or

handling redirect in program code.

The error page of

================
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site
might be experiencing technical difficulties, or you may need to adjust
your browser settings.
.......
Cannot find server or DNS Error
Internet Explorer
===================

displayed.



Anyone know how to handle this problem?


Thank you very much.
 
A

Alvin Bruney [MVP]

I've run into this, I couldn't find a way to handle the error either. I'll
do some research on it and let you know what I find out. I didn't find
anything on it before but it's worth another shot.
 
M

Mark1969

Hi

Ive found exacaty the same problem

I tried using Appliaction_Error to write to an error log, set a sessio
variable to flag the error and then redirect back to the original page

the application_error event is fired ok, the event log is written, th
session variable is set but the response.redirect doesnt work - i als
tried server.transfer - that doesnt work either

has anyone found a method of displaying a useful error message ?

thanks
Mar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top