473,938 Members | 8,938 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 2694
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
4251
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
5580
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
1658
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
1448
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
1001
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
9497
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
34256
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
2267
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
3465
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
9963
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11104
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...
1
11287
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10655
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9854
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
8216
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
6073
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
4444
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3499
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.