Setting Up IIS to Host ASP

IIS 6 might not have ASP enabled if the server was just installed or if it had never been used for hosting ASP in the past. Installing support for ASP is easy, however:

  1. Open the Control Panel and choose Add Or Remove Programs.

  2. In the Add Or Remove Programs applet, make sure the Change Or Remove Programs icon is selected on the left side. Choose the Add Or Remove Windows Components icon and the Windows Component Wizard will be displayed.

  3. Select Application Server and click the Details button.

  4. After the Application Server applet opens, select Internet Information Services (IIS) and click the Details button.

  5. After the Internet Information Services applet opens, select World Wide Web Service and click the Details button.

  6. Finally, make sure a check appears in the checkbox for Active Server Pages in the World Wide Web Service applet, as shown in Figure 12-4, and ASP support will be installed.

    click to expand
    Figure 12-4: Installing ASP support from the Windows Component Wizard

A new feature of Windows Server 2003 (WS03) and IIS 6 is the restriction of all server-side programmatic support by default and the requirement that server-side programming support be explicitly enabled. Requesting a file that must be processed using an ISAPI extension like ASP.DLL that is not enabled will result in a 404 error being returned. In previous versions of Windows Server, IIS came loaded with all ISAPI extensions, such as ASP.DLL, enabled. The functionality must be enabled on the server using the Web Service Extensions administrative node in the Computer Management Microsoft Management Console (MMC) snap-in, as shown in Figure 12-5. To enable the IIS to serve requests to ASP files, choose Active Server Pages in the right pane and then click the Allow button.

click to expand
Figure 12-5: Enabling ASP using Web Service Extensions

The web instance in IIS or the virtual directory must also have the script permissions set to allow ASP to run. By default, the Execute Permissions setting in the Properties window for a given IIS instance or virtual directory is not set to allow scripts to run. Here's how to access this setting:

  1. Open the IIS MMC plug-in and right-click the web instance or virtual directory to expose the context menu.

  2. Choose Properties to open the Properties window for the web instance or virtual directory.

  3. On the Virtual Directory tab for the Properties window of a Virtual Directory or the Home Directory tab for the Properties window of a web instance in an Execute Permissions drop-down box, as shown in Figure 12-6. Select Scripts Only.

    click to expand
    Figure 12-6: Setting the Execute permissions for a virtual directory

  4. Click OK to close the window.

  5. After you set the permissions, you can move the ASP file to the web instance or virtual directory to make ASP function properly. If everything is properly set in IIS, ASP files should be executed when requested from a browser.




IIS 6(c) The Complete Reference
IIS 6: The Complete Reference
ISBN: 0072224959
EAN: 2147483647
Year: 2005
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net