Answered by:
IIS 7 on Win 2008 not serving static pages

Question
-
User280264539 posted
Hi, I just installed a win 2008 server and the IIS doesnt serve static pages and serves aspx pages just fine. Here is my handler mappings <ADD type="" responseBufferLimit="4194304" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="*" path="*.svc" name="svc-ISAPI-2.0"><ADD type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="*" path="*.svc" name="svc-Integrated"></ADD><ADD type="" responseBufferLimit="4194304" preCondition="" allowPathInfo="true" requireAccess="Execute" resourceType="File" scriptProcessor="" modules="IsapiModule" verb="*" path="*.dll" name="ISAPI-dll"></ADD><ADD type="System.Web.Handlers.TraceHandler" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="trace.axd" name="TraceHandler-Integrated"></ADD><ADD type="System.Web.Handlers.WebAdminHandler" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,DEBUG" path="WebAdmin.axd" name="WebAdminHandler-Integrated"></ADD><ADD type="System.Web.Handlers.AssemblyResourceLoader" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,DEBUG" path="WebResource.axd" name="AssemblyResourceLoader-Integrated"></ADD><ADD type="System.Web.UI.PageHandlerFactory" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="*.aspx" name="PageHandlerFactory-Integrated"></ADD><ADD type="System.Web.UI.SimpleHandlerFactory" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="*.ashx" name="SimpleHandlerFactory-Integrated"></ADD><ADD type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="*.asmx" name="WebServiceHandlerFactory-Integrated"></ADD><ADD type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="*.rem" name="HttpRemotingHandlerFactory-rem-Integrated"></ADD><ADD type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" responseBufferLimit="4194304" preCondition="integratedMode" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="" modules="ManagedPipelineHandler" verb="GET,HEAD,POST,DEBUG" path="*.soap" name="HttpRemotingHandlerFactory-soap-Integrated"></ADD><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.axd" name="AXD-ISAPI-2.0"><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.aspx" name="PageHandlerFactory-ISAPI-2.0"><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.ashx" name="SimpleHandlerFactory-ISAPI-2.0"><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.asmx" name="WebServiceHandlerFactory-ISAPI-2.0"><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.rem" name="HttpRemotingHandlerFactory-rem-ISAPI-2.0"><ADD type="" responseBufferLimit="0" preCondition="classicMode,runtimeVersionv2.0,bitness32" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" modules="IsapiModule" verb="GET,HEAD,POST,DEBUG" path="*.soap" name="HttpRemotingHandlerFactory-soap-ISAPI-2.0"><ADD type="" responseBufferLimit="4194304" preCondition="" allowPathInfo="false" requireAccess="None" resourceType="Unspecified" scriptProcessor="" modules="ProtocolSupportModule" verb="TRACE" path="*" name="TRACEVerbHandler"></ADD><ADD type="" responseBufferLimit="4194304" preCondition="" allowPathInfo="false" requireAccess="None" resourceType="Unspecified" scriptProcessor="" modules="ProtocolSupportModule" verb="OPTIONS" path="*" name="OPTIONSVerbHandler"></ADD><ADD type="" responseBufferLimit="4194304" preCondition="" allowPathInfo="false" requireAccess="Script" resourceType="Unspecified" scriptProcessor="C:\Windows\System32\inetsrv\isapi.dll" modules="DefaultDocumentModule" verb="*" path="*" name="Static pages">Any help is greatly appreciated.
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" type="" modules="IsapiModule" scriptProcessor="%SystemRoot%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="4194304" />
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="ISAPI-dll" path="*.dll" verb="*" type="" modules="IsapiModule" scriptProcessor="" resourceType="File" requireAccess="Execute" allowPathInfo="true" preCondition="" responseBufferLimit="4194304" />
<add name="TraceHandler-Integrated" path="trace.axd" verb="GET,HEAD,POST,DEBUG" type="System.Web.Handlers.TraceHandler" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="WebAdminHandler-Integrated" path="WebAdmin.axd" verb="GET,DEBUG" type="System.Web.Handlers.WebAdminHandler" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="AssemblyResourceLoader-Integrated" path="WebResource.axd" verb="GET,DEBUG" type="System.Web.Handlers.AssemblyResourceLoader" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="PageHandlerFactory-Integrated" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.PageHandlerFactory" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="SimpleHandlerFactory-Integrated" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="System.Web.UI.SimpleHandlerFactory" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="WebServiceHandlerFactory-Integrated" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="System.Web.Services.Protocols.WebServiceHandlerFactory, System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="HttpRemotingHandlerFactory-rem-Integrated" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="HttpRemotingHandlerFactory-soap-Integrated" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="System.Runtime.Remoting.Channels.Http.HttpRemotingHandlerFactory, System.Runtime.Remoting, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
<add name="AXD-ISAPI-2.0" path="*.axd" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="PageHandlerFactory-ISAPI-2.0" path="*.aspx" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="SimpleHandlerFactory-ISAPI-2.0" path="*.ashx" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="WebServiceHandlerFactory-ISAPI-2.0" path="*.asmx" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="HttpRemotingHandlerFactory-rem-ISAPI-2.0" path="*.rem" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="HttpRemotingHandlerFactory-soap-ISAPI-2.0" path="*.soap" verb="GET,HEAD,POST,DEBUG" type="" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="classicMode,runtimeVersionv2.0,bitness32" responseBufferLimit="0" />
<add name="TRACEVerbHandler" path="*" verb="TRACE" type="" modules="ProtocolSupportModule" scriptProcessor="" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
<add name="OPTIONSVerbHandler" path="*" verb="OPTIONS" type="" modules="ProtocolSupportModule" scriptProcessor="" resourceType="Unspecified" requireAccess="None" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
<add name="Static pages" path="*" verb="*" type="" modules="DefaultDocumentModule" scriptProcessor="C:\Windows\System32\inetsrv\isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />
Monday, May 11, 2009 1:27 AM
Answers
-
User744767459 posted
Hi,
<add name="Static pages" path="*" verb="*" type="" modules="DefaultDocumentModule" scriptProcessor="C:\Windows\System32\inetsrv\isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />This Static pages handle is different with the default one. Could you backup your config file, then replace the section with the default settings?
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
Also, make sure the static content role service have installed. If you problem still persist, I’d suggest you enable the Failed Request Tracing feature to determine the cause.
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Saturday, May 16, 2009 2:53 AM
All replies
-
User-2064283741 posted
What error do you get? number and subcode
App pool in integrated or classic mode?
Monday, May 11, 2009 5:06 AM -
User280264539 posted
There is no error message. Accessing any static page (eg html) just returns blank page. The app pool is running in Integrated mode. As I mentioned before the aspx pages work just fine.
Tuesday, May 12, 2009 1:58 AM -
User744767459 posted
Hi,
<add name="Static pages" path="*" verb="*" type="" modules="DefaultDocumentModule" scriptProcessor="C:\Windows\System32\inetsrv\isapi.dll" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="" responseBufferLimit="4194304" />This Static pages handle is different with the default one. Could you backup your config file, then replace the section with the default settings?
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
Also, make sure the static content role service have installed. If you problem still persist, I’d suggest you enable the Failed Request Tracing feature to determine the cause.
- Marked as answer by Anonymous Tuesday, September 28, 2021 12:00 AM
Saturday, May 16, 2009 2:53 AM -
User-2064283741 posted
Leo,
Would a migration of the web.config, so it is compatible for the Integrated pipeline, solve this problem?
e.g. AppCmd Migrate Config <config>
Saturday, May 16, 2009 7:44 AM -
User280264539 posted
Thanks Leo, Some how I had corrupted my static file handler mapping settings. I copied what u have mentioned and that fixed the issue.Monday, May 18, 2009 1:05 AM -
User-1022089452 posted
I had the same problem (don't ask me the cause) and solving it was a pain, so I thought I would show what I did in case it will help others. There maybe side effects, I am unaware of, to the way I did it but this is what I did.
The <handler> I ended up with was different than above. I used:
<handlers> <add name="myHandlerName" path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="File" requireAccess="Read" preCondition="integratedMode" /> </handlers>
Then I was getting an error: There is no build provider registered for the extension '.html'.
So I had to add the following under <system.web>
<compilation debug="true" targetFramework="4.0" > <buildProviders> <add extension=".html" type="System.Web.Compilation.PageBuildProvider"/> </buildProviders> </compilation>
Setting up Failed Request Tracing was very helpful. I set the status codes that I was logging to "200-999" w. o. the quotes.
The log files ended up at C:\inetpub\logs\FailedReqLogFiles\W3SVC3
The initial error it showed me was:
Handler "StaticFile" has a bad module "StaticFileModule" in its module list
An excellent guide to how set up tracing is at http://learn.iis.net/page.aspx/266/troubleshooting-failed-requests-using-tracing-in-iis/Sunday, July 1, 2012 12:51 PM