Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
title: HTTP error 404.17 when you visit a Web site
description: This article provides resolutions for the HTTP Error 404.17 - Not Found error when you visit a Web site that is hosted on IIS 7.0 or later versions.
description: This article provides resolutions for the HTTP Error 404.17 - Not Found error when you visit a Web site that is hosted on IIS 10.0 and later versions.
ms.date: 12/11/2020
ms.custom: sap:Site Behavior and Performance\Runtime errors and exceptions, including HTTP 400 and 50x errors
---
# Error message when you visit a Web site that is hosted on IIS 7.0 or later versions: HTTP Error 404.17 - Not Found
# Error message when you visit a Web site that is hosted on IIS 10.0 and later versions: HTTP Error 404.17 - Not Found

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.
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) 10.0 and 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:
You have a Web site that is hosted on IIS 10.0 and 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
Expand All @@ -37,24 +37,27 @@ This error occurs because the HTTP Handler configured to handle the request has
For example, consider the following handler mapping:

```xml
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
```

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.
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 .NET Framework 4.x CLR. In order for the resource to be served correctly in this example, all three preconditions 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 v4.0 .NET CLR version, and it would need to be set for 32-bit applications.

> [!NOTE]
> The same issue can occur with .NET Framework 2.0 handler mappings (using `runtimeVersionv2.0` and the `v2.0.50727` ISAPI path). The resolution is the same: ensure the application pool settings match all of the handler's preconditions.

## Resolution

To resolve this issue, configure the Application Pool hosting the application to meet all of the pre-conditions set for the Handler.

1. Open the IIS Manager
2. Expand the computer name and click **Application Pools** in the left pane.
3. Highlight the Application Pool hosting the resource in the middle pane.
4. In the far right pane, click **Advanced Settings...**
5. In the **Advanced settings** dialog under the category (General), configure the following settings to match the handler requirements:
1. Open the IIS Manager.
2. Expand the computer name and select **Application Pools** in the left pane.
3. Select the Application Pool hosting the resource in the middle pane.
4. In the far right pane, select **Advanced Settings...**
5. In the **Advanced Settings** dialog under the **(General)** category, configure the following settings to match the handler's preconditions:

- .NET Framework Version
- Enable 32-Bit Applications
- Managed Pipeline Mode
- **.NET CLR Version** — Set to `v4.0` (for .NET Framework 4.x apps) or `v2.0` (for .NET Framework 2.0/3.5 apps).
- **Enable 32-Bit Applications** — Set to `True` if the handler specifies `bitness32`.
- **Managed Pipeline Mode** — Set to `Classic` or `Integrated` to match the handler's precondition.

## More information

Expand All @@ -73,7 +76,7 @@ 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)
APPPOOL "DefaultAppPool" (MgdVersion:v4.0,MgdMode:Integrated,state:Started)
```

### List handlers
Expand All @@ -87,13 +90,40 @@ C:\Windows\System32\inetsrv>appcmd.exe list config "Default Web Site/application
```xml
<system.webServer>
<handlers accessPolicy="Read, Script">
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
</system.webServer>
```

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.
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 common ASP.NET handler mappings with their various precondition settings.

### ASP.NET 4.x handlers

- ASP.NET 4.x Integrated Mode 32/64-bit Handler

```xml
<add name="PageHandlerFactory-Integrated-4.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG"
type="System.Web.UI.PageHandlerFactory" preCondition="integratedMode,runtimeVersionv4.0" />
```

- ASP.NET 4.x Classic Mode 32-bit Handler

```xml
<add name="PageHandlerFactory-ISAPI-4.0_32bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule"
scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32"
responseBufferLimit="0" />
```

- ASP.NET 4.x Classic Mode 64-bit Handler

```xml
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG"
modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll"
preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
```

### ASP.NET 2.0 handlers

- ASP.NET 2.0 Integrated Mode 32/64-bit Handler

Expand Down Expand Up @@ -122,33 +152,34 @@ In the case of ASP.NET, there may be many handlers configured for a *.aspx resou

1. Create a directory that contains two files.

- *Test.aspx* with the content `<%Response.Write("Hello World")%>`

- *Test.aspx* with the following content:

```aspx-csharp
<%@ Page Language="C#" %>
<html>
<body>
<%= "Hello World" %>
</body>
</html>
```

- *Web.config* with the content:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="false" destination="http://TestSite" exactDestination="false" childOnly="false" httpResponseStatus="Permanent" />
<security>
</security>
<handlers>
<clear/>
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-4.0_64bit" path="*.aspx" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>
</system.webServer>
<system.web>
<authentication mode="Windows">
<forms cookieless="UseCookies" />
</authentication>
</system.web>
</configuration>
```

2. Create an IIS 7.0 or later versions application that points to the directory with these two files.
2. Create an application in IIS that points to the directory with these two files.

3. Configure the new application to run in an application pool that is configured for integrated mode.
3. Configure the new application to run in an application pool that is configured for **Integrated** mode (which doesn't match the `classicMode` precondition in the handler).

4. Browse to *test.aspx*.