Print Page | Close Window

My First ASP Page Not Working!

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=27790
Printed Date: 29 March 2026 at 2:48am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: My First ASP Page Not Working!
Posted By: san1965
Subject: My First ASP Page Not Working!
Date Posted: 04 September 2009 at 3:53pm
Hi,
My first ASP page is not working, help!
I have followed the instructions given in the page: http://www.webwiz.net/kb/asp_tutorials/first_asp_page.asp" rel="nofollow - http://www.webwiz.net/kb/asp_tutorials/first_asp_page.asp , to the last dot. After creating the file, I transfered it to C:\INetPub\wwwroot folder. Then I gave the command: http://localhost/MyFirstASP.asp" rel="nofollow - http://localhost/MyFirstASP.asp . Alternatively, I changed the "localhost" string to my computer's name. In both the cases, I get the message - HTTP 404 not found.
I also copied the asp file in a separate folder under "Web Sites" in the IIS snap-in. And tried running the file from there, but there it gave me absolutely no response.
What I am doing wrong? Why doesn't IIS recognize the ASP file? Is there something else that I need to install before the file will run?



Replies:
Posted By: WebWiz-Bruce
Date Posted: 04 September 2009 at 4:01pm
It sounds like ASP is not enabled in IIS.

What OS are you using?


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 04 September 2009 at 4:12pm
Hello,
Thank you for your help.
I am using XP Pro.


Posted By: san1965
Date Posted: 04 September 2009 at 4:24pm
Hi again,
When I run http://localhost" rel="nofollow - http://localhost as it is, I get the message "HTTP 404 Not Found". Similarly, when I run http://<computer_name>, I still get the same message.


Posted By: Scotty32
Date Posted: 04 September 2009 at 5:24pm
Localhost, <computer_name>, <computer_ip_address>

Will all point to the same place and be treated as the same website.


-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: san1965
Date Posted: 04 September 2009 at 5:28pm
Hello Scotty32,
Thank you for your inputs, much appreciated.
I don't understand why the first program is not working, as I have followed the instructions of the chapter exactly. What should be done to resolve the problem and proceed?
Thanks again...


Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 1:01pm
The following may help as it tells you how to install IIS on XP Pro:-

http://www.webwiz.net/kb/asp_tutorials/installing_iis_winXP_pro.asp" rel="nofollow - http://www.webwiz.net/kb/asp_tutorials/installing_iis_winXP_pro.asp


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 1:18pm
Hello WebWiz-Bruce,
Thank you for your help.
I used the very page pointed to by you to proceed with IIS installation, and then reached the page where the ASP program was discussed. Besides the default, I also later installed "Scripts" component, hoping that somehow that might solve the problem.
Between the IIS installation and the first ASP program, is there any step that I might be missing? What about installing ASP? Does ASP come pre-installed with Windows? Or does ASP also get installed when IIS is installed? Or is this something that I should have done separately, before venturing to run the ASP code?
 
Thanks, ...


Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 1:50pm
The first thing to check is that it is a 404 page not found error and not a 500 internal server error.

If it is a 500 internal server error you need to turn off friendly HTTP errors in IE so you can see the real error.

If it is a 404 page not found error make sure the path to the file is correct.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 1:58pm

Hello WebWiz-Bruce,

Thank you for your message.
 
IE returns the 404 page "The Page cannot be found". I also unchecked the "Show friendly HTTP error messages" in the Advance tab of "Internet Options". Still the same result.
 
I am wondering: I have Visual studio.net installed on the machine. Have never used it as yet, though. Would the presence of this software have any influence on ASP program's behavior?
 
Thanks in advance...

 

 



Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 2:19pm
It may do as it may change the path to the IIS default website.

Have a look at the default websites properties in IIS and see what the path is. It should be C:\InetPub\wwwroot, but this may have been changed by Visual Studio, in which case you would need to move your MyFirstASP.asp to this new location.

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 2:29pm

Hello WebWiz-Bruce,

Thank you for your message.

In the default website properties of IIS, the "Home Directory" tab has the following information:

Local Path: c:\Inetpub\wwwroot

Read, Log visits, Index this resource checked.

In "Application Settings" in this same tab:

Application Name: Default Application

Starting Point: <Default Website>

Execute Permissions: Scripts Only

Application Protection: Medium (Pooled)

In the "Web Site" tab:

IP Address: (All Unassigned)

TCP Port: 80

Connection Timeout: 900 seconds

HTTP Keep-Alives Enabled is checked

Enable Logging is checked

Active Log Format is W3C Extended Log File Format.

There is one tab for ASP.NET also...

 



Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 2:29pm
I have just remembered that Visual Studio installs it's own web server, which may stop IIS from working correctly

-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 2:43pm
Hi,
It is working!
The only change I made, while noting down the contents of the tabs in order to write them here, was to change the value of "Description" field in the "Web Site Identification" box of the "Web Site" tab to something meaningful.
Now, to see if this small content change really made any difference, I have gone back and deleted the string I had inserted earlier, clicked Apply and OK, and ran the program again. It is still working!
Perhaps, the only justification for this error is that the "Web Site" description has to be given some value, even it is blank, for the ASP to work. May be the tutorial for installing the IIS needs to be updated to incorporate this small point?
Thank you everyone for sparing your time to resolve this problem.

 

One corollary to this issue is: If my .asp file is located in some other folder on some other partition, can I still run it? In the IIS snap-in, I had created a new "virtual directory" by right-clicking on the website that appears below the "Web Sites" folder in the inverted tree. I have a .asp file located in this virtual directory, which is essentially a folder on a separate partition. In the URL field of the browser, what address do I give to run this file?

Thanks in advance...


Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 2:50pm
I very much doubt changing the description made it work, however as Visual Studio installs it's own web server it more than likely disabled the IIS default website, by changing it's properties re enabled the IIS default website.

I would suggest that you do a bit of reseach on Google to findout how you can have the Visual Studio web server and IIS working side by side, or disable the one in Visual Studio to prevent an further issues.

Your other questions, yes you can crate virtual directories in IIS to run ASP websites. The path would be http://localhost/virtual_directory_name




-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 3:02pm

Hello WebWiz-Bruce,

Thank you for your message.

What you are saying makes sense. Changing one of the properties of the website and clicking on Apply must have nudged ASP.NET to release its hold over the IIS' set of websites.

Your input on using the virtual directory name in the URL path has worked too, thanks! Much appreciated!

Would like to know if there is any URL where the internals of IIS - such as the meanings of the individual items in the "Website properties", that of the individual entries that come up when the IIS service name in the inverted tree, etc. - are described in detail? This perhaps is the right time to come to grips with the subject.

Thank you once again...

 



Posted By: WebWiz-Bruce
Date Posted: 07 September 2009 at 3:53pm
IIS can be a very complex subject. if you wanted to learn what all these settinsg will do I would recommend buying one of Microsoft's books on IIS.

Win XP Pro uses IIS 6, however everything changed with IIS 7 which comes with Vista and Windows 2008 as IIS 7 is very much different to previous versions and if you are going to learn about IIS then you maybe better off learning the new version.

Windows 7 and Windows 2008 R2 both come with IIS 7.5 which basically adds a few new tools to IIS 7.0.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: san1965
Date Posted: 07 September 2009 at 4:04pm

Hello WebWiz-Bruce,

Thank you for your detailed response, much appreciated. I am sure I will have many more queries in the future as I proceed with my learning of ASP, and hope that your guidance will continue.

Signing off on this thread...

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net