Custom 404 Page and IIS 5.0 Logging

Discussion in 'ASP General' started by Matt, Jun 16, 2004.

  1. Matt

    Matt Guest

    I notice that when you have the defualt setup of 404 error
    pages the IIS 5.0 log tracks the page the user was trying
    to get to and the page they where at when they tryed to
    get to the now missing page. I recently wrote my own 404
    error page to make it match my site but when I set IIS to
    use my custom page it no longer traks the page that the
    user was trying to get. I was told I needed to add some
    code to my page to fix this, but I don't know what code to
    add. Can someone tell me? (I am useing ASP on the custom
    404 error page)
    Matt, Jun 16, 2004
    #1
    1. Advertising

  2. Matt

    Ray at Guest

    First question - are you returning a 404 response status?

    Response.Status = 404

    I don't know that that makes the 404s log as 404s in the IIS log, but you
    could/should try that first.


    Ray at work


    "Matt" <> wrote in message
    news:1d60e01c453d4$99f6ff90$...
    > I notice that when you have the defualt setup of 404 error
    > pages the IIS 5.0 log tracks the page the user was trying
    > to get to and the page they where at when they tryed to
    > get to the now missing page. I recently wrote my own 404
    > error page to make it match my site but when I set IIS to
    > use my custom page it no longer traks the page that the
    > user was trying to get. I was told I needed to add some
    > code to my page to fix this, but I don't know what code to
    > add. Can someone tell me? (I am useing ASP on the custom
    > 404 error page)
    Ray at, Jun 16, 2004
    #2
    1. Advertising

  3. Matt

    Matt Guest

    Yes, i am returning a 404 response and that gets the log
    to log that there was a 404 error and where it came from
    but not what page that the user was trying to get to.
    >-----Original Message-----
    >First question - are you returning a 404 response status?
    >
    >Response.Status = 404
    >
    >I don't know that that makes the 404s log as 404s in the

    IIS log, but you
    >could/should try that first.
    >
    >
    >Ray at work
    >
    >
    >"Matt" <> wrote in

    message
    >news:1d60e01c453d4$99f6ff90$...
    >> I notice that when you have the defualt setup of 404

    error
    >> pages the IIS 5.0 log tracks the page the user was

    trying
    >> to get to and the page they where at when they tryed to
    >> get to the now missing page. I recently wrote my own 404
    >> error page to make it match my site but when I set IIS

    to
    >> use my custom page it no longer traks the page that the
    >> user was trying to get. I was told I needed to add some
    >> code to my page to fix this, but I don't know what code

    to
    >> add. Can someone tell me? (I am useing ASP on the custom
    >> 404 error page)

    >
    >
    >.
    >
    Matt, Jun 16, 2004
    #3
  4. Matt

    Jeff Cochran Guest

    On Wed, 16 Jun 2004 17:10:30 -0400, "Ray at <%=sLocation%> [MVP]"
    <myfirstname at lane34 dot com> wrote:

    >First question - are you returning a 404 response status?
    >
    >Response.Status = 404
    >
    >I don't know that that makes the 404s log as 404s in the IIS log, but you
    >could/should try that first.


    I think the issue is that the default 404 page also logs the requested
    page, and his custom page does not.

    Jeff

    >"Matt" <> wrote in message
    >news:1d60e01c453d4$99f6ff90$...
    >> I notice that when you have the defualt setup of 404 error
    >> pages the IIS 5.0 log tracks the page the user was trying
    >> to get to and the page they where at when they tryed to
    >> get to the now missing page. I recently wrote my own 404
    >> error page to make it match my site but when I set IIS to
    >> use my custom page it no longer traks the page that the
    >> user was trying to get. I was told I needed to add some
    >> code to my page to fix this, but I don't know what code to
    >> add. Can someone tell me? (I am useing ASP on the custom
    >> 404 error page)

    >
    Jeff Cochran, Jun 17, 2004
    #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. Jonathan Folland
    Replies:
    2
    Views:
    1,614
    Jonathan Folland
    Mar 17, 2005
  2. Jonathan Folland
    Replies:
    0
    Views:
    398
    Jonathan Folland
    Apr 1, 2005
  3. Paul Woods

    Custom 404 and logging

    Paul Woods, Sep 30, 2003, in forum: ASP General
    Replies:
    4
    Views:
    112
    Aaron Bertrand [MVP]
    Oct 5, 2003
  4. Joe

    Custom 404 page on IIS

    Joe, Sep 18, 2004, in forum: ASP General
    Replies:
    2
    Views:
    102
    joker
    Sep 19, 2004
  5. Sujan
    Replies:
    1
    Views:
    123
Loading...

Share This Page