You receive a "Page cannot be displayed" error message when you use an ASP.NET application to open an .htm file or another static file that is hosted in IIS 6.0
On This PageSYMPTOMSConsider the following scenario:
"The page cannot be displayed"
CAUSEThis issue occurs when a corresponding mapping for
the file name extension does not exist in the ASP.NET HTTP handlers
configuration.
Note This issue does not occur if the Aspnet_isapi.dll file is configured as a wildcard application map in IIS 6.0. WORKAROUNDTo 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 mapCreate 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.
Method 2: Create a mapping in ASP.NET in the root Web.config fileModify the root Web.config file. To do this, locate the following code in the root Web.config file. Replace
that code with the following code.
MORE INFORMATIONMicrosoft ASP.NET 2.0 delegates static file
processing back to the IIS 6.0 static file handler through the
Execute URL server support function. This behavior lets you
to run ASP.NET authentication and authorization modules while
serving static content.
Because ASP.NET 2.0 delegates static file processing back to IIS 6.0, any explicit script mapping that maps a file name extension to ASP.NET must have a corresponding mapping in ASP.NET. If the corresponding mapping in ASP.NET does not exist, ASP.NET passes the file processing back to IIS. IIS detects this recursion and then sends an empty HTTP response. By default, default file name extensions are mapped to the DefaultHttpHandler in ASP.NET 2.0. In ASP.NET 1.1 and in ASP.NET 1.0, default file name extensions are mapped to the StaticFileHandler. REFERENCESFor more information about how the
httpHandlers element is configured in the root Web.config
file, visit the following Microsoft Developer Network (MSDN) Web
site:
http://msdn2.microsoft.com/en-us/library/bya7fh0a.aspx
(http://msdn2.microsoft.com/en-us/library/bya7fh0a.aspx)
|
Search Support (KB)Article Translations
|