Custom Error Pages

Discussion in 'ASP .Net' started by Kenneth Keeley, Nov 13, 2003.

  1. Hi
    I have created a Web.config file with theses settings:
    <customErrors mode="RemoteOnly"
    defaultRedirect="/errorpages/generic.aspx">
    <error statusCode="403" redirect="/errorpages/noaccess.aspx" />
    <error statusCode="404" redirect="/errorpages/filenotfound.aspx" />
    </customErrors>

    If a user tries to go to a folder that does not exist then I get my default
    HTML error page for directory not found.
    If a user tries to go to an aspx page in a folder that does not exist that
    get a horrible error page telling them that of A Runtime Error and that they
    should changes the Web.config error mode to off to see the Error. How can I
    make it that they go to one of my nice looking Error pages.

    Thanks
     
    Kenneth Keeley, Nov 13, 2003
    #1
    1. Advertising

  2. Kenneth Keeley

    Priya Guest

    Hi Kenneth,
    Have u navigated to /errorpages/filenotfound.aspx to
    ensure that this page loads up okay by itself? You might
    be getting an error because of some code on this page. To
    check if this is a case, create a test "filenotfound.html"
    and set web.config so that 404 status takes u
    to /errorpages/filenotfound.html instead of the aspx page.
    If this works okay, u know there is something wrong with
    ur particular aspx page.

    >-----Original Message-----
    >Hi
    > I have created a Web.config file with theses settings:
    > <customErrors mode="RemoteOnly"
    >defaultRedirect="/errorpages/generic.aspx">
    > <error statusCode="403"

    redirect="/errorpages/noaccess.aspx" />
    > <error statusCode="404"

    redirect="/errorpages/filenotfound.aspx" />
    > </customErrors>
    >
    >If a user tries to go to a folder that does not exist

    then I get my default
    >HTML error page for directory not found.
    >If a user tries to go to an aspx page in a folder that

    does not exist that
    >get a horrible error page telling them that of A Runtime

    Error and that they
    >should changes the Web.config error mode to off to see

    the Error. How can I
    >make it that they go to one of my nice looking Error

    pages.
    >
    >Thanks
    >
    >
    >.
    >
     
    Priya, Nov 13, 2003
    #2
    1. Advertising

  3. "Priya" <> wrote in message
    news:095301c3a9a7$44359260$...
    > Hi Kenneth,
    > Have u navigated to /errorpages/filenotfound.aspx to
    > ensure that this page loads up okay by itself? You might
    > be getting an error because of some code on this page. To
    > check if this is a case, create a test "filenotfound.html"
    > and set web.config so that 404 status takes u
    > to /errorpages/filenotfound.html instead of the aspx page.
    > If this works okay, u know there is something wrong with
    > ur particular aspx page.


    The page seems to work fine but the fault occurs if you try to get to a
    folder called publications
    Why would this be the case.
     
    Kenneth Keeley, Nov 13, 2003
    #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. Mike Speak

    CUSTOM ERROR PAGES

    Mike Speak, Nov 5, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    344
    John Soulis [MSFT]
    Nov 6, 2003
  2. Steve Klett

    using custom error pages w/ runtime errors

    Steve Klett, Nov 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    381
    Steve Klett
    Nov 12, 2003
  3. =?Utf-8?B?Umh5czY2Ng==?=

    Custom Error Pages

    =?Utf-8?B?Umh5czY2Ng==?=, Mar 30, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    371
    =?Utf-8?B?Umh5czY2Ng==?=
    Mar 30, 2005
  4. Brian Munroe

    Custom Error Pages in ASP.NET - Global.asax

    Brian Munroe, Apr 28, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    1,179
    Brian Munroe
    Apr 28, 2005
  5. Laurie Dvorak

    Display images in Custom Error Pages

    Laurie Dvorak, Jul 6, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    670
    Laurie Dvorak
    Jul 6, 2005
Loading...

Share This Page