Setting up error pages

Discussion in 'ASP General' started by Stuart Palmer, Aug 6, 2006.

  1. Hi guys,

    Not sure if this is an IIS query or ASP, however, I'll try here first.

    I'm trying to create custom error pages where I can report to the user (and
    email myself) when I get 404 errors. My problem isn't the asp code side (as
    I have this working on my hosting companies server) but when I develop I
    want to be able to have the same event occuring.

    Basically I need to somehow set up or understand how my hosting companies
    site provides a url that looks like
    http://www.mydomain.com/errors/404.asp?404;http://www.mydomain.com/doesnotexist.asp

    At the moment it just shows http://www.mydomain.com/errors/404.asp so I
    can't pull out the error type and path to the file that doesn't exists.

    Is this somehow done with asp? or a setting in IIS?
    I have lookd on the web and found stuff about URL mapping but it mentioned
    virtual directories and such which I don't have on my site.

    Any comments on how this is achieved (either coding or how to set it up in
    IIS) would be greatly appriciated.

    Cheers
    Stu

    --
     
    Stuart Palmer, Aug 6, 2006
    #1
    1. Advertising

  2. Stuart Palmer wrote:
    > Hi guys,
    >
    > Not sure if this is an IIS query or ASP, however, I'll try here first.
    >
    > I'm trying to create custom error pages where I can report to the
    > user (and email myself) when I get 404 errors. My problem isn't the asp
    > code
    > side (as I have this working on my hosting companies server) but when I
    > develop I want to be able to have the same event occuring.
    >
    > Basically I need to somehow set up or understand how my hosting
    > companies site provides a url that looks like
    > http://www.mydomain.com/errors/404.asp?404;http://www.mydomain.com/doesnotexist.asp
    >
    > At the moment it just shows http://www.mydomain.com/errors/404.asp so
    > I can't pull out the error type and path to the file that doesn't
    > exists.
    > Is this somehow done with asp? or a setting in IIS?
    > I have lookd on the web and found stuff about URL mapping but it
    > mentioned virtual directories and such which I don't have on my site.
    >
    > Any comments on how this is achieved (either coding or how to set it
    > up in IIS) would be greatly appriciated.
    >

    http://www.aspfaq.com/show.asp?id=2162
    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
     
    Bob Barrows [MVP], Aug 6, 2006
    #2
    1. Advertising

  3. >>http://www.aspfaq.com/show.asp?id=2162

    Thanks, I had already found this page but it doesn't actually do what i want
    it to do (even though it does describe what I want). By clicking the 'Here
    is an example' link, it just prvoides a url but doesn't actually give me the
    querystring format I am after (?404;) instead all it does is keep the url
    selected but show the 404 page.

    Could his be a setting in my browser? or do I need to add some code in my
    404 to process it as I would expect?

    Stu
     
    Stuart Palmer, Aug 7, 2006
    #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. Srinivasa Raghavan Sethuraman
    Replies:
    0
    Views:
    567
    Srinivasa Raghavan Sethuraman
    Jun 30, 2004
  2. CJ
    Replies:
    1
    Views:
    1,585
    Andrew Thompson
    Oct 29, 2004
  3. Sile
    Replies:
    5
    Views:
    707
  4. Replies:
    0
    Views:
    482
  5. Replies:
    2
    Views:
    1,132
Loading...

Share This Page