Keywords: IIS 7.5 | HTTP error 404.3 | ASP.NET configuration
Abstract: This article delves into the HTTP error 404.3 encountered in IIS 7.5 on Windows Server 2008 R2 when using ASP.NET 4.0 projects with WCF services. By analyzing the error causes, it provides a complete solution from installing IIS subcomponents to configuring application pools, including the use of the aspnet_regiis tool and verification of .NET framework versions. The discussion also covers the importance of MIME types and handler mappings, ensuring readers can systematically diagnose and fix such configuration issues.
Problem Background and Error Analysis
When running IIS 7.5 on Windows Server 2008 R2 x64 Enterprise Edition, developers often encounter HTTP error 404.3, especially when deploying applications based on ASP.NET 4.0 and WCF services. The error message clearly states: "The page you are requesting cannot be served because of the extension configuration. If the page is script, add a handler. If the file should be downloaded, add a MIME map." This typically indicates that IIS fails to correctly recognize or process specific file extensions, preventing requests from being served.
Core Solution: Installing IIS Subcomponents
To resolve this issue, first ensure that necessary IIS subcomponents are installed. Follow these steps: Open Control Panel → Programs and Features → Turn Windows features on or off. Under Internet Information Services, expand World Wide Web Services → Application Development Features. Here, you must check the ASP.NET option, which will automatically select dependencies such as .NET Extensibility, ISAPI Extensions, and ISAPI Filters. Note that in newer systems like Windows Server 2012 R2, these options may be split by .NET versions (e.g., 4.0 and 4.5), so select the appropriate version based on project requirements.
Registering ASP.NET with IIS
After installing components, use the aspnet_regiis.exe tool to register ASP.NET with IIS. Run Command Prompt as administrator and execute: %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir. This command installs ASP.NET version 4.0 and configures IIS to handle related requests properly. If the project uses a 32-bit environment, you may need to use the Framework directory instead of Framework64.
Configuring Application Pools
In IIS Manager, verifying application pool settings is crucial. Ensure your application uses an application pool configured for .NET Framework version v4.0. Right-click the application pool, select Basic Settings, and check if the .NET CLR version is v4.0.30319. Mismatched versions can cause error 404.3, as IIS cannot load the correct runtime to process requests.
Supplementary Measures and Best Practices
Beyond the above steps, check MIME types and handler mappings. In IIS Manager, select the server or website, and open the MIME Types and Handler Mappings features. Ensure the .svc extension (for WCF services) is correctly configured. For example, the .svc extension should be mapped to the ASP.NET handler. If missing, add it manually: In handler mappings, add a mapping with extension .svc, handler as System.ServiceModel.Activation.HttpHandler, and type as System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089. This ensures WCF service requests are properly routed and processed.
Conclusion and Prevention
HTTP error 404.3 often stems from incomplete or incorrect IIS configuration. By systematically installing components, registering ASP.NET, verifying application pools, and checking extension mappings, you can efficiently resolve the issue. It is recommended to thoroughly test environment configurations before deployment and refer to Microsoft official documentation and community resources, such as discussions on Stack Overflow, to prevent similar problems. Regularly updating IIS and .NET frameworks can also reduce compatibility issues.