404 error produces 302 response

Discussion in 'ASP General' started by nutso fasst, Mar 2, 2007.

  1. nutso fasst

    nutso fasst Guest

    Hello.

    IIS 4 website with a custom 404 error page WAS working OK, but at some
    point it wacked out. In the logs there were no 404 error responses. Instead,
    what were recorded were 200(OK) responses with my custom 404 page.

    Researching, I found that when a non-existent resource was requested,
    instead of directly responding with the 404 error page, the server responded
    with 302 (Found / Moved
    Temporarily) and a redirection to my custom error page. The redirection URL
    had a querystring added, e.g.:
    http://mysite.com/my404.asp?404;http://mysite.com/nofile.htm

    I added Response.Status = "404 Not Found" at the top of the error page to
    ensure a 404 response, but the redirection and logging anomaly continued.

    I went back to the default .htm error page and behavior returned to normal.

    I noticed that my404.asp called a component and wondered if that could be
    the problem. So I edited, then specified that page for 404 error. Strangely,
    it seemed to work OK initially but quickly reverted to bad behavior. So I
    switched back to an HTML error page.

    This website is a physically-congruent subset of another website and shared
    the asp error page so I though that might be the problem. But when I gave
    the other site a different copy of the error page the problem not only
    persisted, the second site began exhibiting the same behavior.

    All's OK using HTML error files, but I'm curious if anyone has a clue as to
    the cause/cure of the bad behavior with ASP.

    thanks,
    nf
     
    nutso fasst, Mar 2, 2007
    #1
    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. Stan
    Replies:
    6
    Views:
    1,015
    Steven Cheng[MSFT]
    Oct 28, 2004
  2. Vlad
    Replies:
    1
    Views:
    859
    Fred Chateau
    Dec 7, 2006
  3. Zester

    302 Object Moved response

    Zester, Dec 6, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    725
    Ken Schaefer
    Dec 7, 2007
  4. Andreas.Bretl
    Replies:
    0
    Views:
    170
    Andreas.Bretl
    May 18, 2004
  5. David Morgan
    Replies:
    1
    Views:
    354
    raj chahal
    Feb 24, 2006
Loading...

Share This Page