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. Advertisements

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,393
    Steven Cheng[MSFT]
    Oct 28, 2004
  2. Jonathan Folland
    Replies:
    2
    Views:
    1,990
    Jonathan Folland
    Mar 17, 2005
  3. Vlad
    Replies:
    1
    Views:
    1,006
    Fred Chateau
    Dec 7, 2006
  4. Zester

    302 Object Moved response

    Zester, Dec 6, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    912
    Ken Schaefer
    Dec 7, 2007
  5. Tim M

    ASP Page Produces 50MB Response

    Tim M, May 9, 2004, in forum: ASP General
    Replies:
    1
    Views:
    140
    Aaron Bertrand [MVP]
    May 9, 2004
  6. Andreas.Bretl
    Replies:
    0
    Views:
    284
    Andreas.Bretl
    May 18, 2004
  7. David Morgan
    Replies:
    1
    Views:
    493
    raj chahal
    Feb 24, 2006
  8. Amruta Maniyar

    HTTP response 302

    Amruta Maniyar, Mar 10, 2011, in forum: Ruby
    Replies:
    5
    Views:
    295
    wearld 9
    Mar 28, 2011
Loading...