首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在IIS上承载WCF服务(找不到资源)

在IIS上承载WCF服务(找不到资源)
EN

Stack Overflow用户
提问于 2012-06-24 22:06:08
回答 2查看 2K关注 0票数 3

我正在制作WFC服务。当我在Visual Studio中调试它时,一切正常,但是当我在真正的IIS上部署它时,我遇到了问题。

在部署之后,我仍然可以获得WSDL,但是当我请求WebGet方法(它返回一个简单的XML文档)方法时,我得到了以下错误:

代码语言:javascript
复制
The resource cannot be found.

Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable.  Please review the following URL and make sure that it is spelled correctly. 

问题的起因是什么?

我的Web.Config:

代码语言:javascript
复制
<system.serviceModel>
<services>
  <service name="XXXX.TSDX.UI.TsdxService">
    <endpoint 
        address="Tsdx" 
        binding="webHttpBinding" 
        bindingConfiguration="TestBinding" 
        behaviorConfiguration="RESTFriendly" 
        contract="XXXX.TSDX.UI.ITsdxService" />
  </service>
</services>
<bindings>
  <webHttpBinding>
    <binding name="TestBinding" />
  </webHttpBinding>
</bindings>
<behaviors>
  <serviceBehaviors>
    <behavior name="">
      <serviceMetadata httpGetEnabled="true" />
      <serviceDebug includeExceptionDetailInFaults="false" />
    </behavior>
  </serviceBehaviors>
  <endpointBehaviors>
    <behavior name="RESTFriendly">
      <webHttp />
    </behavior>
  </endpointBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
EN

回答 2

Stack Overflow用户

发布于 2012-06-24 22:26:04

验证在ASP.NET选项卡(在IIS中)中为应用程序选择的.NET框架版本是否正确

票数 0
EN

Stack Overflow用户

发布于 2014-05-21 05:27:14

如果您在MVC应用程序中托管此服务,请确保添加以下行以忽略控制器路由冲突,我在挣扎了一段时间后遇到了这个问题,我找到了这个解决问题的答案。

routes.IgnoreRoute("{ allsvc }",新的{allsvc= @"..svc(/.*)?“});

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/11178111

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档