SYMPTOMS
Consider the following scenario:
- Microsoft Internet Information Services (IIS) 6.0 is running on a Microsoft Windows Server 2003-based computer.
- You have an existing Microsoft ASP.NET application that is running on the Microsoft .NET Framework 1.1 or on the Microsoft .NET Framework 1.0.
- This application is mapped to the corresponding .NET Framework 1.1 Aspnet_isapi.dll file or to the corresponding .NET Framework 1.0 Aspnet_isapi.dll file in IIS 6.0.
- You install the Microsoft .NET Framework 2.0.
- You modify the ASP.NET application to use the .NET Framework 2.0, and then map the ASP.NET application to Aspnet_isapi.dll file in the .NET Framework 2.0.
In this scenario, you may receive an error message that is similar to the following when you use the ASP.NET application to open an .htm file or another static file that is hosted in IIS 6.0:
"The page cannot be displayed"
WORKAROUND
To work around this issue, use one of the following methods.
Method 1: Create a mapping in ASP.NET at the level of the IIS 6.0 script map
Create specific mappings in the ASP.NET HTTP handlers configuration to the static file handler (System.Web.StaticFileHandler). Create a mapping in the ASP.NET HTTP handlers configuration for each specific mapping in the IIS 6.0 scriptmaps.
For example, add a mapping in the ASP.NET HTTP handlers configuration for files that have the .htm file name extension. To do this, add the following code to the
httpHandlers element in the Web.config file at the level that corresponds to where the IIS 6.0 script mapping is defined. If Aspnet_isapi.dll is mapped globally, use the Web.config file in the Config folder that is located in the .NET Framework installation folder.
<add path="*.htm" verb="*" type="System.Web.StaticFileHandler" />
Method 2: Create a mapping in ASP.NET in the root Web.config file
Modify the root Web.config file. To do this, locate the following code in the root Web.config file.
<add path="*" verb="GET,HEAD,POST" type="System.Web.DefaultHttpHandler" validate="True" />
Replace that code with the following code.
<add path="*" verb="GET,HEAD,POST" type="System.Web.StaticFileHandler" validate="True" />