ASP returning 404

M

Mohammed Hamama

Hi all,

I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite
installed on it. I have 2 websites A & B. ASP pages on A are working
properly, but when placed one B they return 404 error. All other pages
such as txt, html, asp.net work fine on B. Both websites have the same
configuration, and use the same ISAPI filters.

A sample code that is not working is, file name test.asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.redirect("URL")%>

Do you know what needs to be done to fix that?

Thanks,
Mohammed
 
R

Ray Costanzo [MVP]

Have you tried

Response.Redirect "fileThatActuallyExists.asp"

Or do you really have a file named URL?

Ray at home
 
V

Victor

Mohammed Hamama said:
Hi all,

I am using a windows 2000 server with IISLockdown and ISAPI_Rewrite
installed on it. I have 2 websites A & B. ASP pages on A are working
properly, but when placed one B they return 404 error. All other pages
such as txt, html, asp.net work fine on B. Both websites have the same
configuration, and use the same ISAPI filters.

A sample code that is not working is, file name test.asp:
<%@ LANGUAGE="VBSCRIPT" %>
<% response.redirect("URL")%>

Do you know what needs to be done to fix that?

What is the format of the URL? Can you give us an example?
 
E

Evertjan.

Mohammed Hamama wrote on 28 okt 2006 in
microsoft.public.inetserver.asp.general:
The URL can stand for any URL. For example you can have it
http://www.cnn.com and it will still return the 404 page instead.

[please always quote relevant part on usenet, this is not email]

Mohammed, I seem te remember you were asking about:

<%
Response.redirect "http://www.cnn.com"
%>
Re: ASP returning 404

It seems to me ASP does not "return" anything in this sense,
it is the browser being redirected to some web page, isn't it?

ASP just sends a header entry [and a small piece of HTML for noncompliant
browsers] in a 302-Object-moved page stream sent to the requesting client
browser, advising the browser to redirect to an outside URL.

Did you inspect the header?

Use <http://www.rexswain.com/httpview.html> [or many others]

========================================

It should show something like this:

Receiving Header:
HTTP/1.1·302·Object·moved(CR)(LF)
Connection:·close(CR)(LF)
Date:·Sat,·28·Oct·2006·07:37:00·GMT(CR)(LF)
Server:·Microsoft-IIS/6.0(CR)(LF)
MicrosoftOfficeWebServer:·5.0_Pub(CR)(LF)
X-Powered-By:·ASP.NET(CR)(LF)
Location:·http://www.cnn.com(CR)(LF)
Content-Length:·139(CR)(LF)
Content-Type:·text/html(CR)(LF)
Expires:·Sat,·28·Oct·2006·05:57:00·GMT(CR)(LF)
Set-Cookie:·ASPSESSIONIDXXXXXXXXX=CFINMBIBKIJXXXXXX;·path=/(CR)(LF)
Cache-control:·private(CR)(LF)
(CR)(LF)

End of Header (Length = 377)
• Elapsed time so far: 1 seconds
• Waiting for additional response until connection closes...

Total bytes received = 516
Elapsed time so far: 1 seconds
Content (Length = 139):
<head><title>Object·moved</title></head>(LF)
<body><h1>Object·Moved</h1>This·object·may·be·found·<a·
HREF="http://www.cnn.com">here</a>.</body>(LF)

Done

==========================================

So what is different in your case?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top