WCF Service IIS Hosting Error


i have a couple of web site in IIS now i have added a WCF service under sites>default website > MyWCFService.

When i tried to browse the Service1.svc file through content view in IIS i was presented below error

HTTP Error 404.17 - Not Found
The requested content appears to be script and will not be served by the static file handler. 

Detailed Error Information
Module:  StaticFileModule 
Notification : ExecuteRequestHandler 
Handler : StaticFile 
Error Code 0x80070032 
Requested URL :  https://localhost:443/MyWCFService/Service1.svc
Physical Path : D:\Inetpub\wwwroot\MyWCFService\Service1.svc 
Logon Method : Negotiate 

 Most likely causes:
•The request matched a wildcard mime map. The request is mapped to the static file handler. If there were different pre-conditions, the request will map to a different handler.

 Things you can try:
•If you want to serve this content as a static file, add an explicit MIME map.

Here is my webconfig file:

<?xml version="1.0"?>

    <compilation debug="true" />
      <service name="MyService.Service1" behaviorConfiguration="MyService.Service1Behavior">
        <endpoint address="Service1" binding="basicHttpBinding" contract="MyService.IService1"/>
        <behavior name="MyService.Service1Behavior">
          <serviceMetadata httpGetEnabled="true"/>
          <serviceDebug includeExceptionDetailInFaults="false"/>
        <behavior name="webBehaviour">

The service runs fine in my local machine, but it fails in IIS, may be something to do with IIS Settings?

I'm running on IIS version 7.5.7600.

Thanks in advance

Edit 1: : Installed WCF Activation (HTTP Activation and Non-HTTP Activation) under .net Framework 3.5.1 features in via Server mnager. Now the error when i tried browing the service1.svc file through browser is

Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089'. 

i have added this entry in web.config file as well
<compilation debug="true" strict="false" explicit="true">
<add assembly="System.ServiceModel, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

No great change in output.

asked on Stack Overflow Jun 18, 2014 by Ramu • edited Jun 20, 2014 by Ramu

1 Answer


The requested content appears to be script and will not be served by the static file handler.

Don't use Content View, use a browser.

See also Script not served by static file handler on IIS7.5.

answered on Stack Overflow Jun 18, 2014 by CodeCaster • edited May 23, 2017 by Community

User contributions licensed under CC BY-SA 3.0