- Posts: 114
- Thank you received: 0
asp
20 years 6 months ago #3474
by indebluez
hey guys how do i run asp pages on my iis?
it jus refuses to run...like for instances this code...it doesnt result in the word hello on the page
<html>
<body>
<%
document.write ("hello")
%>
</body>
</html>
also the file is in wwwroot..and its named test.asp
i ran it from explorer but not wkin....help?? also when i type
http://localhost/myweb/test.asp...the test.asp is in a folder myweb which is in wwwroor...i get an error msg instead
Not Found
The requested URL /MyWeb/test2.asp was not found on this server.
Apache/1.3.29 Server at indebluez.myvnc.com Port 80
help?
it jus refuses to run...like for instances this code...it doesnt result in the word hello on the page
<html>
<body>
<%
document.write ("hello")
%>
</body>
</html>
also the file is in wwwroot..and its named test.asp
i ran it from explorer but not wkin....help?? also when i type
http://localhost/myweb/test.asp...the test.asp is in a folder myweb which is in wwwroor...i get an error msg instead
Not Found
The requested URL /MyWeb/test2.asp was not found on this server.
Apache/1.3.29 Server at indebluez.myvnc.com Port 80
help?
20 years 6 months ago #3475
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
uhm uhm uhm..... I saw something at the bottom there that says 'Apache 1.3.29 Server'.. you're serving asp pages on apache ? Well you could technically do that with Chilisoft.. but I have a feeling this problem is far more basic hehe...
if your file is in wwwroot, then you're looking to view it in IIS... not Apache....
Yes, I know its embarrassing.. but -- you got the wrong webserver !
if your file is in wwwroot, then you're looking to view it in IIS... not Apache....
Yes, I know its embarrassing.. but -- you got the wrong webserver !
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
20 years 6 months ago #3476
by tfs
Thanks,
Tom
First of all, you have the wrong statement.
document.write is for javascript.
For asp:
<html>
<body>
<%
response.write ("hello")
%>
</body>
</html>
What I assume you got on your page was something like:
[code:1]The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
Click the Refresh button, or try again later.
Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/Hello2.asp, line 4
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Page:
GET /Hello2.asp
Time:
Saturday, April 24, 2004, 11:07:03 PM
More information:
Microsoft Support
[/code:1]
You can see that the error is on line 4, which is where your document.write is. It also tells you that you that an object is required. Document is not a valid object - response is.
If it is not found - I assume your Home directory is not set up correctly.
Before I start playing with other directories, I would just try to get it to work in wwwroot and make sure that the Home directory is wwwroot.
document.write is for javascript.
For asp:
<html>
<body>
<%
response.write ("hello")
%>
</body>
</html>
What I assume you got on your page was something like:
[code:1]The page cannot be displayed
There is a problem with the page you are trying to reach and it cannot be displayed.
Please try the following:
Click the Refresh button, or try again later.
Open the localhost home page, and then look for links to the information you want.
HTTP 500.100 - Internal Server Error - ASP error
Internet Information Services
Technical Information (for support personnel)
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: ''
/Hello2.asp, line 4
Browser Type:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)
Page:
GET /Hello2.asp
Time:
Saturday, April 24, 2004, 11:07:03 PM
More information:
Microsoft Support
[/code:1]
You can see that the error is on line 4, which is where your document.write is. It also tells you that you that an object is required. Document is not a valid object - response is.
If it is not found - I assume your Home directory is not set up correctly.
Before I start playing with other directories, I would just try to get it to work in wwwroot and make sure that the Home directory is wwwroot.
Thanks,
Tom
20 years 6 months ago #3481
by tfs
Thanks,
Tom
With Apache, you can run ASP but must use it with Pearl -
www.apache-asp.org/
shell4.tdl.com/ASP/
www.bluereef.net/support/apachemod/apache-asp.html
As far as your other problem, if you are using an IIS server:
Not sure what is happening here.
The javascript message you are showing has the error on line 52. That is not the page you displayed.
[code:1]<html>
<body>
<%
document.write ("hello")
%>
</body>
</html>
[/code:1]
Your javascript code will be inside of "script" tags and your asp code will be inside of <%...%> tags.
Your first (above) code had a problem because you have an javascript line in your asp section (document.write). I assume in your other error you have an asp line (response.write) in your javascript section.
You can't mix the two. You can have have both javascript and asp on the same page, just not in the same section.
Asp code is analysed before being submitted to the user by the server and the Javascript code is handled by the browser after being submitted.
shell4.tdl.com/ASP/
www.bluereef.net/support/apachemod/apache-asp.html
As far as your other problem, if you are using an IIS server:
Not sure what is happening here.
The javascript message you are showing has the error on line 52. That is not the page you displayed.
[code:1]<html>
<body>
<%
document.write ("hello")
%>
</body>
</html>
[/code:1]
Your javascript code will be inside of "script" tags and your asp code will be inside of <%...%> tags.
Your first (above) code had a problem because you have an javascript line in your asp section (document.write). I assume in your other error you have an asp line (response.write) in your javascript section.
You can't mix the two. You can have have both javascript and asp on the same page, just not in the same section.
Asp code is analysed before being submitted to the user by the server and the Javascript code is handled by the browser after being submitted.
Thanks,
Tom
20 years 6 months ago #3485
by sahirh
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
First and foremost, Apache on Windows is not a great idea.. I don't suggest you do it.. even though it seems to work fine. In fact the Apache guys themselves say never to run Apache Win32 as a production system.
Secondly, ASP works best with IIS.. why not just use IIS ? You can integrate IIS with your development environment.. if you go to ASP.Net and use IIS (which it will force you to do) you can seamlessly modify your web application right from the .Net IDE...
Secondly, ASP works best with IIS.. why not just use IIS ? You can integrate IIS with your development environment.. if you go to ASP.Net and use IIS (which it will force you to do) you can seamlessly modify your web application right from the .Net IDE...
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
Time to create page: 0.132 seconds