<customErrors

Discussion in 'ASP .Net' started by Arne Garvander, Jun 13, 2008.

  1. I have <customErrors .. in my web.config but the redirect does not kick in.
    What am I doing wrong?
    <customErrors defaultRedirect="Error.aspx" mode="On">
    <error statusCode="404" redirect="Filenotfound.aspx"/>
    </customErrors>
    --
    Arne Garvander
    Certified Geek
    Professional Data Dude
     
    Arne Garvander, Jun 13, 2008
    #1
    1. Advertising

  2. On Jun 13, 6:48 pm, Arne Garvander
    <> wrote:
    > I have <customErrors .. in my web.config but the redirect does not kick in..
    > What am I doing wrong?
    > <customErrors defaultRedirect="Error.aspx" mode="On">
    >                         <error statusCode="404" redirect="Filenotfound.aspx"/>
    >                 </customErrors>
    > --
    > Arne Garvander
    > Certified Geek
    > Professional Data Dude


    Arne

    I suppose 404 is not working? If you call that page with the full URL
    at http://servername/Filenotfound.aspx, does it work?
     
    Alexey Smirnov, Jun 13, 2008
    #2
    1. Advertising

  3. I can go there directly. The automatic redirect does not work.
    --
    Arne Garvander
    Certified Geek
    Professional Data Dude


    "Alexey Smirnov" wrote:

    > On Jun 13, 6:48 pm, Arne Garvander
    > <> wrote:
    > > I have <customErrors .. in my web.config but the redirect does not kick in..
    > > What am I doing wrong?
    > > <customErrors defaultRedirect="Error.aspx" mode="On">
    > > <error statusCode="404" redirect="Filenotfound.aspx"/>
    > > </customErrors>
    > > --
    > > Arne Garvander
    > > Certified Geek
    > > Professional Data Dude

    >
    > Arne
    >
    > I suppose 404 is not working? If you call that page with the full URL
    > at http://servername/Filenotfound.aspx, does it work?
    >
     
    Arne Garvander, Jun 13, 2008
    #3
  4. On Jun 13, 8:58 pm, Arne Garvander
    <> wrote:
    > I can go there directly. The automatic redirect does not work.
    > --
    > Arne Garvander
    > Certified Geek
    > Professional Data Dude
    >
    >
    >
    > "Alexey Smirnov" wrote:
    > > On Jun 13, 6:48 pm, Arne Garvander
    > > <> wrote:
    > > > I have <customErrors .. in my web.config but the redirect does not kick in..
    > > > What am I doing wrong?
    > > > <customErrors defaultRedirect="Error.aspx" mode="On">
    > > >                         <error statusCode="404" redirect="Filenotfound.aspx"/>
    > > >                 </customErrors>
    > > > --
    > > > Arne Garvander
    > > > Certified Geek
    > > > Professional Data Dude

    >
    > > Arne

    >
    > > I suppose 404 is not working? If you call that page with the full URL
    > > athttp://servername/Filenotfound.aspx, does it work?- Hide quoted text -

    >
    > - Show quoted text -


    So, what do you get when you go to http://server/pagedoesnotexist.aspx?
    A blank page, an error... etc?

    Try to get rid of defaultRedirect="Error.aspx" to see if it 404 would
    work, or not (maybe you have an exception somethere, or a redirect in
    case of an error). Check if path of redirect is correct, change it to
    "~/Filenotfound.aspx", or "~/DIR/Filenotfound.aspx"... If it doesn't
    help, look at IIS, Application Configuration, properties for aspx
    files in the Application Extensions and ensure that "Verify that file
    exists" is unmarked.
     
    Alexey Smirnov, Jun 13, 2008
    #4
    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. NRao

    customErrors 404

    NRao, Jul 1, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    506
    Bassel Tabbara [MSFT]
    Jul 1, 2003
  2. Jesse Napier

    CustomErrors statusCode 500

    Jesse Napier, Aug 7, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    4,825
    Michal A. Valasek
    Aug 7, 2003
  3. =?Utf-8?B?cmV6YQ==?=

    <customErrors .... not working??

    =?Utf-8?B?cmV6YQ==?=, Feb 18, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    1,004
    Jim Cheshire [MSFT]
    Feb 18, 2004
  4. Pete Davis

    customErrors issues

    Pete Davis, Mar 2, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    405
    Pete Davis
    Mar 6, 2004
  5. =?Utf-8?B?U2FtdWVs?=

    .NET question about the customErrors Tag

    =?Utf-8?B?U2FtdWVs?=, May 2, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    481
    Steven Cheng[MSFT]
    May 11, 2004
Loading...

Share This Page