Kamicase Posted April 29, 2012 Share Posted April 29, 2012 Hello everyone, I am new to .asp but interested in the possibilities and have one or two smaller projects I would like to develop some skills on.So far I have followed the W3Schools .asp tutorial, installed IIS (enabling the .asp extension), the MyWeb folder and copy/pasted some .asp Code into a .txt document, saved it as test1.asp and then tried to access it via http://localhost/MyWeb/test1.asp .The script itself reads: <%@ LANGUAGE="VBSCRIPT" %> <!--- You should get ---><!--- current system date and time ---> <HTML><HEAD><TITLE>ASP Test Page</TITLE></HEAD> <BODY>Today's date and time is <%=Now()%>.</BODY></HTML> But everytime I try to load the page it gives me: HTTP-Fehler 404.0 - Not Found I have quadruplechecked the adress C:\inetpub\wwwroot\MyWeb\test1.asp with the one it wants to access C:\inetpub\wwwroot\MyWeb\test1.asp, I have checked if the .asp extension is active under Assigned Handlers (or the closest match, I'm translating from the German Handlerzuordungen here) and now I have to admit that I need help. Does anyone know what I might be doing wrong? Link to comment Share on other sites More sharing options...
justsomeguy Posted April 30, 2012 Share Posted April 30, 2012 You need to use HTTP to access server-side content, the URL needs to start with HTTP. The domain for your local computer is "localhost". Link to comment Share on other sites More sharing options...
Kamicase Posted April 30, 2012 Author Share Posted April 30, 2012 I try accessing the script via http://localhost/MyWeb/test1.asp and get the 404.0. So were you thinking about a different HTTP?Furthermore I can't understand what you mean by The domain for your local computer is "localhost".Could you please expand on that? Regards,Kamicase Link to comment Share on other sites More sharing options...
justsomeguy Posted April 30, 2012 Share Posted April 30, 2012 Sorry, I missed the part where you mentioned that. Do you get a 404 if you access a regular HTML page or image? Link to comment Share on other sites More sharing options...
Kamicase Posted April 30, 2012 Author Share Posted April 30, 2012 I can load regular .htm scripts onto my firefox. What I have noted though is that for some reason my computer doesn't convert the extensions.I have created a .txt File, written some HTML script in it and saved it as test.htm but it still remained a text document and wasn't accepted as a Firefox HTML Document. Then I downloaded a test file from w3s which worked just great but as I went to save it on my desktop I noted that my textfile was saved under test.htm.txt.Could this maybe be part of the problem? Link to comment Share on other sites More sharing options...
justsomeguy Posted April 30, 2012 Share Posted April 30, 2012 Yeah, your text editor is doing that. If you're using Notepad, when you're saving the file choose "All files" or whatever from the type dropdown instead of a text file. Link to comment Share on other sites More sharing options...
Kamicase Posted April 30, 2012 Author Share Posted April 30, 2012 Son of a gun!Well that took care of it.Silly Notepad. Lesson learned then: When writing .asp Code using the Notepad you have to drop down the Menu to "All files" when saving it, else it will be saved as a textfile, regardless of the ending. Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now