Setting up the Webserver for ASP

You can’t just stick ASP in a HTML file and expect it to work. Learn what needs to be done on the webserver to get started with ASP.

ASP is a language which is interpreted before the end user sees the webpage. That is, if you write a block of ASP code to create a list of available books for sale, the end user won’t see any of that code. He or she will only see the nicely formatted list of books, just as if you wrote that list manually in HTML.

This means that you need to set up your webserver to know to process the file before handing it over to the end user. These instructions are for IIS, but the steps are similar in other web server systems.

First, use your Server Manager which should launch right when you reboot your computer. If you’re running IIS7 and above, this step is needed to even get ASP onto your computer. In Server Manager, click Manage, Add Roles (Next), your server (Next), and then when you get to all the server roles expand out the list. You’re looking for Web Server (IIS), then Application Development. You’re looking for both ASP and ISAPI. Install those. I suggest rebooting.

Now go into whichever IIS manager you use. Highlight the website you’re interested in. For that website that you’d like to use ASP with, right click and go into PROPERTIES. You’ll get a multi-tab page with all of the details of that webpage.

Click on the HOME DIRECTORY tab. In the lower area is the Application Settings group. Click on Configuration.

If necessary, add two new lines to this area with the ADD button. These lines should read:

Extension: asa
Executable path: c:\winnt\System32\inetsrv\asp.dll

Extension: asp
Executable path: c:\winnt\System32\inetsrv\asp.dll

If your asp.dll file is located in another directory, indicate which one it is actually in.

That’s it! Name your files with a .asp extension, and you should be ready to start using ASP code.

This page is lesson two in my free ASP Classic Course. Click below to enjoy the full course from start to finish!

Free Online ASP Course