MVC 2 and ASP.NET 4 Web Forms applications that use URL routing might return HTTP 404 errors when they attempt to process extensionless URLs on IIS 7 and IIS 7.5

Article translations Article translations
Close Close
Article ID: 2023146 - View products that this article applies to.
Expand all | Collapse all

Symptoms

MVC 2 and ASP.NET 4 Web Forms applications that use extensionless URLs might return HTTP 404 errors when they run on Windows Vista, Windows Server 2008, Windows 7, or Windows Server 2008 R2.

Cause

The 404 error can occur when only the .NET Framework Extensibility option is enabled when IIS is installed through the Windows Features dialog box. A minimal installation of IIS will not include certain HTTP modules. Because of how ASP.NET and IIS manage HTTP pipeline-event transitions, the missing HTTP modules prevent the ASP.NET URL routing module from running at the appropriate time. As a result, requests for extensionless URLs are not processed by the URL routing module, and a 404 error occurs.

Resolution

In the "Turn Windows Features On or Off" dialog box of the Windows Control Panel "Programs and Features" application, perform the following steps:
1. Navigate to the following node: Internet Information Services --> World Wide Web Services --> Common HTTP Features
2. Make sure that the "HTTP Error Redirection" option is selected.

-or-

1. Navigate to the following node: Internet Information Services --> World Wide Web Services --> Performance Features
2. Make sure that the "Static Content Compression" option is selected. After either option has been selected, click "OK" to save changes.

Re-enabling either the HTTP Error Redirection module or the Static Content Compression module ensures that ASP.NET and IIS correctly synchronize HTTP pipeline events. This enables the URL routing module to process extensionsless URLs.
Note This is a "FAST PUBLISH" article created directly from within the Microsoft support organization. The information contained herein is provided as-is in response to emerging issues. As a result of the speed in making it available, the materials may include typographical errors and may be revised at any time without notice. See Terms of Use for other considerations.

Properties

Article ID: 2023146 - Last Review: June 9, 2010 - Revision: 3.0
APPLIES TO
  • Microsoft .NET Framework 4
Keywords: 
KB2023146

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com