473,830 Members | 2,152 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Application_Err or and Maximum request length exceeded


Dear all:

I know how to use the "Application_Er ror" in "Global.asa x" to catch the
exception and display my own error message page.

However, I found "Application_Er ror" cannot handle the error of "Maximum
request length exceeded" (in my case, actually too large upload file
size, I know how to modify the "maxRequestLeng th" 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_Er ror".
However, no matter I used the

<customErrors defaultRedirect ="errorStatus.h tm" 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.cu hk.edu.hk
ja***@compose.c om.hk
Nov 18 '05 #1
2 2686
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***@hkcompos e.com> wrote in message
news:uL******** *****@TK2MSFTNG P12.phx.gbl...

Dear all:

I know how to use the "Application_Er ror" in "Global.asa x" to catch the
exception and display my own error message page.

However, I found "Application_Er ror" cannot handle the error of "Maximum
request length exceeded" (in my case, actually too large upload file
size, I know how to modify the "maxRequestLeng th" 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_Er ror".
However, no matter I used the

<customErrors defaultRedirect ="errorStatus.h tm" 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.cu hk.edu.hk
ja***@compose.c om.hk

Nov 18 '05 #2

Hi

Ive found exacaty the same problem

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

the application_err or event is fired ok, the event log is written, th
session variable is set but the response.redire ct 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
4246
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 error and tell the user what happened. I can trap the error in the page_error (Page.Error) event, and I believe I was also trapping it at the application_error level at one point. My problem is, once I trap the error, I can't do anything to tell...
11
5569
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 the "Maximum request length exceeded" HttpException when a user tries to send a file that is greater than 2MB so that I may tell the user, gracefully, that their file is too big.
0
1649
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 storing them as Application level variables (naming them with the SessionID)? Just curious... Thanks, Chris
6
1442
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 well. However the event never appears to fire from windows 2003. I have tried just about everything and can not find an answer. I cannot debug through the windows 2003 server as I do not have VS installed on it plus it is a live server Can any...
0
997
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 (Request.Url.Segments == "get_aspx_ver.aspx") This code was for VS2003 to catch when it was checking for the hidden file 'get_aspx_ver.aspx" to check which version of Framework was loaded. It appears that VS2005 does something different. Anybody...
2
9489
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 upload file bigger than 1MB. At the top of my request there is a module where I access the request and while querying a parameter: string var = context.Request
3
34244
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 following error occurrs: System.Web.Services.Protocols.SoapException was unhandled Actor="" Lang="" Message="System.Web.Services.Protocols.SoapException: There was an
1
2262
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: System.Web.Services.Protocols.SoapException: There was an exception running the extensions specified in the config file. --- System.Web.HttpRequest.GetEntireRawContent() at
1
3459
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 += new UnhandledExceptionEventHandler(OnUhe); //UHE on threads If I do a throw, the first one gets it. If I do a throw in a thread, the second one gets it.
0
9786
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10769
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10479
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9312
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7741
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6948
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4409
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3073
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.