【问题标题】:WCF HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handlerWCF HTTP 错误 404.17 - 未找到 请求的内容似乎是脚本,不会由静态文件处理程序提供
【发布时间】:2013-06-07 11:09:23
【问题描述】:

我为解决 WCF 的 404.17 问题做了各种尝试,但都没有奏效

开发环境VS 2008 Team System,.NET Framework 3.5,OS Windows 7.0,IIS Application pool v2.0 classic。

我安装了 C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ServiceModelReg

我使用打开 Windows 功能启用了 Windows 通信 HTTP 激活

IIS 中的处理程序映射

svc-ISAPI-2.0 *.svc 已启用未指定 IsapiModule 已继承 svc-ISAPI-4.0_32bit *.svc 已启用未指定 IsapiModule 已继承 svc-ISAPI-4.0_64bit *.svc Enabled Unspecified IsapiModule 继承

我无法将 AppPool 更改为集成模式,因为应用程序在没有经典模式的情况下无法工作,我有 asmx webservices,它们都可以访问。它的 WCF 导致了问题。谁能帮我解决这个 404.17 问题

<system.serviceModel>
                         <behaviors>
                             <serviceBehaviors>
                                 <behavior name="Solution1.WebApp.CallMonitorServiceBehavior">
                                     <serviceMetadata httpGetEnabled="true" />
                                     <serviceDebug includeExceptionDetailInFaults="false" />
                                 </behavior>
                                 <behavior name="Solution1.WebApp.Service1Behavior">
                                     <serviceMetadata httpGetEnabled="true" />
                                     <serviceDebug includeExceptionDetailInFaults="false" />
                                 </behavior>
                             </serviceBehaviors>
                         </behaviors>
                         <services>
                             <service behaviorConfiguration="Solution1.WebApp.CallMonitorServiceBehavior"
                                 name="Solution1.WebApp.CallMonitorService">
                                 <endpoint address="" binding="wsHttpBinding" contract="Solution1.WebApp.ICallMonitorService">
                                     <identity>
                                         <dns value="localhost" />
                                     </identity>
                                 </endpoint>
                                 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                             </service>
                             <service behaviorConfiguration="Solution1.WebApp.Service1Behavior"
                                 name="Solution1.WebApp.Service1">
                                 <endpoint address="" binding="wsHttpBinding" contract="Solution1.WebApp.IService1">
                                     <identity>
                                         <dns value="localhost" />
                                     </identity>
                                 </endpoint>
                                 <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
                             </service>
                         </services>
                     </system.serviceModel>

【问题讨论】:

    标签: wcf


    【解决方案1】:

    尝试从 Windows 功能激活 WCF 服务。转到“控制面板\程序\程序和功能”,然后单击“打开或关闭 Windows 功能”并检查 wcf 服务,如附图所示。

    【讨论】:

    • 在它说 WCF HTTP 激活已启用的问题中,是否还需要启用其他服务才能使其正常工作?
    【解决方案2】:

    尝试将 WCF 注册到 IIS

    导航到“C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation”

    并执行

     servicemodelreg -i
    

    安装它们

    【讨论】:

      猜你喜欢
      • 2014-04-04
      • 1970-01-01
      • 1970-01-01
      • 2013-03-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多