IIS 7.5 - HTTP Error 404.17 - Not Found - Static File Handler.
-
Tuesday, October 19, 2010 4:11 PM
I'm having an issue with web.config file in my development environment. I had the WCF site running on my local. My local has VS2010 framework 4.0 installed. I published the code and hosted the site in IIS 7.5 2008 R2 on my dev server which has an application pool of framework 2.0. I had an issue which says
HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler.
These are the few handlers that i've in my web.config file on my dev server. There are other handlers too which are inherited.
<handlers>
<add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="svc-ISAPI-2.0" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%Windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
<add name="svc-ISAPI-2.0-64" path="*.svc" verb="*" modules="IsapiModule" scriptProcessor="%Windir%\Microsoft.NET\Framework64\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness64" />
<add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
<add name="StaticFile" path="*" verb="*" modules="StaticFileModule,DefaultDocumentModule,DirectoryListingModule" resourceType="Either" requireAccess="Read" />
</handlers>I tried adding
<add name="svc-Integrated" path="*.svc" verb="*" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" preCondition="integratedMode" />
to my web.config file in dev and this resulted in another error.
Server Error in '/XYZ' Application.
Unable to cast object of type 'System.Web.Configuration.ScriptingAuthenticationServiceSection' to type 'System.Web.Configuration.ScriptingAuthenticationServiceSection'.
Can someone help me figure it out. TIA
All Replies
-
Tuesday, October 19, 2010 4:39 PM
I tried running the ServiceModelReg too but it was of no use..."%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -r -y
-
Wednesday, October 20, 2010 4:00 AMModerator
Most of the times you do not need to manually modify your config file to enable IIS host WCF service.
Following article discribes a few common setup problems for IIS to host WCF service and their solutions.
Besides, if your WCF service is developed with .Net 4.0, please also make sure it uses 4.0 App Pool.
Hope that helps.
Lei
- Marked As Answer by Allen Chen - MSFTMicrosoft Employee, Moderator Wednesday, October 27, 2010 8:57 AM

