473,387 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Application_Error and Maximum request length exceeded


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.

--
Jacky Kwok
ja***@alumni.cuhk.edu.hk
ja***@compose.com.hk
Nov 18 '05 #1
2 2649
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.

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Jacky Kwok" <ja***@hkcompose.com> wrote in message
news:uL*************@TK2MSFTNGP12.phx.gbl...

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.

--
Jacky Kwok
ja***@alumni.cuhk.edu.hk
ja***@compose.com.hk

Nov 18 '05 #2

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

--
Mark196
-----------------------------------------------------------------------
Mark1969's Profile: http://www.highdots.com/forums/member.php?userid=33
View this thread: http://www.highdots.com/forums/showthread.php?t=64305

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cmay | last post by:
I have changed my config files to set the limit for files being uploaded to 30 MB, but every now and then someone tries to upload a file larger than this. All I want, is to be able to trap the...
11
by: Chris Hayes | last post by:
Greetings, I have an ASP.NET page that accepts input from an HtmlInputFile object. I have set the maximum size for HttpRequests to 2MB in the web.config file. And now I am trying to CATCH...
0
by: Chris Hayes | last post by:
I've seen that when an HTTP 400 error occurs ("Maximum request length exceeded") that some of my Session level variables and Cookies get "lost" is there a way to preserve them without resorting to...
6
by: Rippo | last post by:
I have a problem with the application_error event being fired from my asp.net application with windows 2003 server standard edition. The event fires fine from my test machine (XP) and all works...
0
by: PaulM | last post by:
While using the debugger in VS2005 it occasionally will cause an Application_Error. The reason I know this is the first line of the Application_Error method checks the request object: if...
2
by: Lloyd Dupont | last post by:
I'm experimenting with an upload file page. I have a few HtmlInputFile on it. While testing it, I selected a 12MBfile, click "upload". I was think I am safe as (at last in the code) I don't...
3
by: =?Utf-8?B?UGV0ZXIgU2NobWl0eg==?= | last post by:
HI, in one of my webservices I need to provide a string to the consuming application that can become really large (depending on user input). Unfortunately, if the string becomes too long, the...
1
by: Cactus77 | last post by:
Hi, I have a problem with deploying a Report Model. I've build a Report Model in Visual Studio and by deploying mij my model, I get the next error: ...
1
by: =?Utf-8?B?Q2h1Y2sgUA==?= | last post by:
I have an HttpModule used for Unhandled Exception processing. The module monitors both application.Error += new EventHandler(OnError); //regular UHE AppDomain.CurrentDomain.UnhandledException +=...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.