Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > 404 error produces 302 response

Thread Tools

404 error produces 302 response

nutso fasst
Posts: n/a

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.:;

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.


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
web.config redirection returns 302 instead of 404 Vlad ASP .Net 1 12-07-2006 07:19 AM
OutputStream from a URLConnection produces an OutOfMemory OutputStream from a URLConnection produces an OutOfMemory Java 2 10-25-2006 04:45 PM
HTTP 302 (Response.Redirect) to mms:// URL gives error, to http:// is ok. David Morgan ASP General 1 02-24-2006 01:33 PM
Server.Transfer produces '404-not found' error only on one computer Stan ASP .Net 6 10-28-2004 02:21 AM
IE produces 404 Error when calling ASP page, but only on some machines... Andreas.Bretl ASP General 0 05-18-2004 01:55 PM