"HTTP Error 404 - File or Directory not found" error message when you request dynamic content with IIS 6.0 (315122)
The information in this article applies to:
- Microsoft Internet Information Services version 6.0
- Microsoft Windows Server 2003, Datacenter Edition
- Microsoft Windows Server 2003, Enterprise Edition
- Microsoft Windows Server 2003, Standard Edition
- Microsoft Windows Server 2003, Web Edition
- Microsoft Windows Small Business Server 2003, Premium Edition
- Microsoft Windows Small Business Server 2003, Standard Edition
This article was previously published under Q315122 SYMPTOMSWhen you request dynamic content such as an Active Server Pages (ASP) page, an ASP.NET page, an Internet Services API (ISAPI) application, or a Common Gateway Interface (CGI) application on a Microsoft Windows Server 2003 server that is running Internet Information Services (IIS) 6.0, you may receive one of the following error messages:
HTTP Error 404 - File Not Found HTTP Error 404- File or Directory not found
CAUSEBy default, when IIS is installed on any version of the Windows Server 2003 family, IIS only serves static content (HTML).RESOLUTIONWarning Enable dynamic content when you really want to use it. By default, IIS disables dynamic content for security reasons.
To permit IIS to serve dynamic content, the administrator must unlock this content in the Web service extensions node in IIS Manager. To do this, the administrator must either enable a pre-existing Web service extension or add a new Web service extension.
Enable a Pre-existing Web Service Extension in IIS 6.0
To permit IIS to serve content that requires a specific ISAPI or CGI extension that is already listed in the Web service extensions list, follow these steps:
- Open IIS Manager, expand the master server node (that is, the Servername node), and then select the Web service extensions node.
- In the right pane of IIS Manager, right-click the extension that you want to enable. In this example, this is Active Server Pages.
- Click to select the Allow check box.
Add a New Web Service Extension to IIS 6.0To permit IIS to serve content that requires a specific ISAPI or CGI extension that is not already listed in the Web service extensions list, follow these steps:
- Open IIS Manager, expand the master server node, and then select the Web service extensions node.
- In the right pane of the IIS Manager, click Add a new Web service extension under Tasks.
- In the Extension name box, type a friendly name for the extension that you want to add (for example, FrontPage Server Extensions).
- In the Required files box, click Add, and then select the path and the name of the file that will handle requests for the specific extension. After you select the path and the file name, click OK.
- If the extension must be enabled immediately, click to select the Set extension status to allowed check box.
- Click OK to save your changes.
Additional steps for Common Gateway Interface (CGI) applicationsFor CGI applications, you must also follow these steps: -
Right-click Default Web Site or the Web site that you want, and then click Properties.
- On the Home Directory tab, click Scripts and Executables in the Execute Permissions list.
- Make sure that the Everyone group has the following NTFS file system permissions on the C:\InetPub\wwwroot folder or on the folder that has the Web content for the site that you want:
- Read & Execute
- List Folder Contents
- Read
-
Right-click Default Web Site or the Web site that you want, and then click Properties.
- On the Home Directory tab, make sure that DefaultAppPool is selecting in the Application pool box. If another application pool is selected, follow these steps in IIS Manager:
- Expand Application Pools, right-click the application pool that you want, and then click Properties.
- On the Identity tab, make sure that one of the following conditions is true:
- The Network Service account is selected.
- The account that is selected is a member of the IIS_WPG group.
STATUS
This behavior is by design.REFERENCESFor more information about Web service extensions, search
for "Enabling and Disabling Dynamic Content" in the IIS 6.0 Help documentation.
For more information, click the following article number to view the article in the Microsoft Knowledge Base:
332124
ASP.NET is not automatically installed on Windows Server 2003
Modification Type: | Major | Last Reviewed: | 2/28/2006 |
---|
Keywords: | kbprb kbWebServices kbAppServices kbHOWTOmaster KB315122 |
---|
|