Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    Jan 2005
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how to call default 404 error page in asp

    Hi all,

    I want to call the default 404 error page in my asp.In my program if their is any error occured I want to display the default error page,so can any of you please say how to call the default 404 error html page in asp.

    Thanks in advance

    Regards,
    Rashmi

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    In IIS, go to Default Web Site Property dialog box, Custom Errors Tab, look for 404 and then edit it to set new HTML file to use.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Is there a way that the same thing can be achieved when u r coding on an ASP server and don't have that kinda flexibility?
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished

  • #4
    Regular Coder
    Join Date
    Jul 2004
    Location
    France
    Posts
    141
    Thanks
    0
    Thanked 0 Times in 0 Posts

    no problem

    yes it's very easy :-)

    on error resume next

    run any code here

    If Err.Number <> 0 then
    Response.Redirect("dhhfhrhflhfhfwefhwwfhewfkhewfjewfhewjfhw.asp")
    End if

    as far as this page doesn't exist you'll get a wonderfull 404 error

  • #5
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    How about:

    if error then
    response.status = "404 Not Found"
    end if


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •