WCF HTTP 错误 404.17 - 未找到请求的内容似乎是脚本,静态文件处理程序不会提供服务 [英] WCF HTTP Error 404.17 - Not Found The requested content appears to be script and will not be served by the static file handler

查看:23
本文介绍了WCF HTTP 错误 404.17 - 未找到请求的内容似乎是脚本,静态文件处理程序不会提供服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我曾多次尝试解决 WCF 的 404.17 问题,但没有一个成功

I have made various attempts to resolve 404.17 issue for WCF but none of them worked

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

Development Environment 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

I installed C:\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation\ ServiceModelReg

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

I enabled Windows Communication HTTP Activation using Turn windows feature on

IIS 中的处理程序映射

Handler Mappings in IIS

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

svc-ISAPI-2.0 *.svc Enabled Unspecified IsapiModule inherited svc-ISAPI-4.0_32bit *.svc Enabled Unspecified IsapiModule inherited svc-ISAPI-4.0_64bit *.svc Enabled Unspecified IsapiModule inherited

我无法将 AppPool 更改为集成模式,因为应用程序在没有经典模式的情况下无法运行,我有 asmx Web 服务并且它们都可以访问.它的 WCF 导致问题.谁能帮我解决这个 404.17 问题

I cannot change the AppPool to integrated mode becuase Application does not work without classic mode, I have asmx webservices and they all are accessible. Its WCF which is causing issue. Could anyone help me how to resolve this 404.17 issue

<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>

推荐答案

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

Try activating WCF service from windows Features. Goto "Control Panel\Programs\Programs and Features" and click "Turn Windows features on or off" and check wcf services as shown in pic attached.

这篇关于WCF HTTP 错误 404.17 - 未找到请求的内容似乎是脚本,静态文件处理程序不会提供服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆