VBScript Tutorials - Herong's Tutorial Examples - Version 6.00, by Dr. Herong Yang
Setting Up IIS to Run ASP Pages - asp.dll
This section provides a tutorial example on how to set up IIS 5.0 to run ASP pages. The important step is to link the .asp extension to the asp.dll library.
In order to play with server-side scripting with VBScript, we need to know enough about IIS to configure it to support the ASP technology.
Step I - Making Sure IIS 5.0 Is Running
Internet Information Services (IIS) 5.0 is a Microsoft product, that offers and manages the Internet services, like web (HTTP) server, and email (SMTP) server.
IIS 5.0 is installed on Windows 2000 by default. I did the following to make sure the web server is working:
1. Go to Control Panel, then Administrative Tools, then Services, and make sure that IIS Admin Service is Started, and World Wide web Publishing Service is Started.
2. Go to Control Panel, then Administrative Tools, then Internet Services Manager, and make sure that the Default Web Site under your local host name is running. If not, right mouse click on Default Web Site, and select Start command.
3. Create the following hello.html file:
4. Copy hello.html to \inetpub\wwwroot, which is the directory where the web server will take the web page files.
5. Run Internet Explorer (IE) with this url: http://localhost/hello.html.
6. If you see "Hello world!" on IE window, you know your IIS web server is serving HTML pages.
Step II - Making sure IIS 5.0 Is Supporting ASP Pages
1. Go to Control Panel, then Administrative Tools, then Internet Services Manager, and right mouse click on Default Web Site, then select properties command.
2. Click on Home Directory tab on the properties dialog box, then click the Configuration button.
3. Click on App Mappings tab on the configuration dialog box, then check to see the following line in the mapping area.
Extension Executable Path Verbs .asp c:\winnt\system32\inetsrv\asp.dll GET,HEAD,POST,TRACE
4. Create the following hello.asp file:
<%@ language="vbscript"%> <html><body> <% response.write("Hello world!") %> </body></html>
5. Copy hello.asp to \inetpub\wwwroot, which is the directory where the web server will take the ASP page files.
6. Run Internet Explorer (IE) with this url: http://localhost/hello.asp.
6. If you see "Hello world!" on the IE window, you know your IIS web server is serving ASP pages.
Step III - Reviewing IIS 5.0 Settings
If you are serious about managing your IIS server, you should go to the properties dialog box on the Default Web Site on Internet Services Manager, and review all the settings. Here are some interesting ones:
Table of Contents