Application_Error and Maximum request length exceeded

Discussion in 'ASP .Net' started by Jacky Kwok, Feb 5, 2004.

  1. Jacky Kwok

    Jacky Kwok Guest

    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

    Jacky Kwok, Feb 5, 2004
    #1
    1. Advertising

  2. 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" <> wrote in message
    news:...
    >
    > 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
    >
    >
    Alvin Bruney [MVP], Feb 6, 2004
    #2
    1. Advertising

  3. Jacky Kwok

    Mark1969 Guest

    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
    Mark1969, Jun 24, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Y21heQ==?=
    Replies:
    8
    Views:
    31,071
    SilentSojourner
    Apr 2, 2012
  2. Chris Hayes
    Replies:
    8
    Views:
    9,366
    DDaanV
    Oct 21, 2010
  3. Chris Hayes
    Replies:
    0
    Views:
    660
    Chris Hayes
    Jul 27, 2005
  4. Lloyd Dupont

    Maximum request length exceeded.

    Lloyd Dupont, Jan 19, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    22,274
    justin_yj
    Oct 29, 2010
  5. =?Utf-8?B?Q2h1Y2sgUA==?=

    Unhandled Exceptions and Maximum request length exceeded

    =?Utf-8?B?Q2h1Y2sgUA==?=, Oct 31, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    489
    bruce barker
    Nov 1, 2007
Loading...

Share This Page