Error message when you visit a Web site that is hosted on IIS 7.0 or later versions: HTTP Error 404.17 - Not Found
Article
This article helps you resolve the HTTP Error 404.17 - Not Found problem when you visit a Web site that is hosted on Internet Information Services (IIS) 7.0 or later versions.
Original product version: Internet Information Services Original KB number: 2019689
Symptoms
You have a Web site that is hosted on IIS 7.0 or later versions. When you browse to dynamic content in the Web site by using a Web browser, you may receive an error message that resembles the following:
Error Summary
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
Detailed Error Information:
This error occurs because the HTTP Handler configured to handle the request has certain preconditions set, but its Application pool does not meet some or all of these preconditions. This causes the static file handler to be used to process the request instead. The processing of the request then fails and the 404.17 status returned because the request is for a dynamic resource and not a static one.
For example, consider the following handler mapping:
In this case, a 404.17 error is returned if the *.aspx resource being requested from the site is handled in an Application pool that is not running in Classic Mode, is not 32 bit, or is not running the 2.0 version of the .NET Framework. In order for the resource to be served correctly in this example, all three pre-conditions must be met. Specifically, the application pool hosting this resource would have to be configured for Classic Mode, it would need to be configured to use the 2.0 version of the .NET Framework, and it would need to be set for 32-bit applications.
Resolution
To resolve this issue, configure the Application Pool hosting the application to meet all of the pre-conditions set for the Handler.
Open the IIS Manager
Expand the computer name and click Application Pools in the left pane.
Highlight the Application Pool hosting the resource in the middle pane.
In the far right pane, click Advanced Settings...
In the Advanced settings dialog under the category (General), configure the following settings to match the handler requirements:
.NET Framework Version
Enable 32-Bit Applications
Managed Pipeline Mode
More information
The information in this section is meant to help identifying which handlers are configured for the web site and application mentioned in the error, as well as help identify the pre-conditions that are configured for that handler.
Appcmd.exe commands
The following commands can be used to identify the handlers configured for the Web Site listed in the output of the error.
List application pool
The following commands show how to determine what application pool the application is running in, and then list the preconditions configured for that application pool.
Console
C:\Windows\System32\inetsrv>appcmd.exe list apps /site.name:"Default Web Site"
APP "Default Web Site/" (applicationPool:DefaultAppPool)
C:\Windows\System32\inetsrv>appcmd.exe list apppools
APPPOOL "DefaultAppPool" (MgdVersion:v2.0,MgdMode:Integrated,state:Started)
List handlers
This command will output the handlers configured for the specific application in the default web site.
Console
C:\Windows\System32\inetsrv>appcmd.exe list config "Default Web Site/application" -section:handlers
In the case of ASP.NET, there may be many handlers configured for a *.aspx resource. In some cases, the handler may just need to be changed to match the application pool the application is running in. Below is a list of the different ASP.NET 2.0 Handlers with their various pre-condition settings.
Learn how to create and utilize a Content Delivery Network (CDN) within Azure to host commonly used assets, such as images in a website. The module covers Azure CDN and uses Blob Storage as an underlying storage model for stable or nonvolatile data.