I am a complete novice to Classic ASP and have been trying to set it up, but I keep running into an error message. I am using IIS7 on Windows 7 and have made sure that IIS is installed, etc. I have created an application that resides in C:\inetpub\wwwroot
and in that directory I have a file called page.asp
. However, whenever I go to my browser which is Chrome and type in localhost
it shows me the blue IIS page but when I type in localhost/page.asp
it gives me the following error message:
An error occurred on the server when processing the URL. Please contact the system administrator
I cannot figure out what I am doing wrong. I have made sure that ASP and IIS are both enabled, and the code in the page is a simple
<html>
<%Response.Write("Hello world")%>
</html>
Can you please help me?
Your pages need to have a .aspx extension and you should revise your page's markup to look something like:
<html>
<body>
<p><%Response.Write("Hello World")%></p>
</body>
</html>
You may want to try using an IDE like visual studio express to help you out. Consider working through the tutorials at www.asp.net/web-forms
You are probably missing the Handler Mappings either for your website or the server (can be configured at multiple levels. Personally I set it at the server level and let it inherit down and enable or disable as appropriate.
This answer has all the information you need to set it up - Answer - How to enable ASP classic in IIS7.5
Should also point out that although the article is talking about IIS 7.5 the procedure is exactly the same in IIS 7.
Handler Mappings are found under the IIS section in the Internet Information Manager.
Add a script map using the following setting (taken from the linked answer):
Request Path: *.asp
Executable: C:\Windows\system32\inetsrv\asp.dll
Name: whatever you want. I named my Classic ASP
The executable above is 64 BIT ASP handler for your asp script. If you want your ASP script to be handled in 32 bit environment, you need to use executable from this location: C:\Windows\SysWOW64\inetsrv\asp.dll
.