我正在制作WFC服务。当我在Visual Studio中调试它时,一切正常,但是当我在真正的IIS上部署它时,我遇到了问题。
在部署之后,我仍然可以获得WSDL,但是当我请求WebGet方法(它返回一个简单的XML文档)方法时,我得到了以下错误:
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:
<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>发布于 2012-06-24 22:26:04
验证在ASP.NET选项卡(在IIS中)中为应用程序选择的.NET框架版本是否正确
发布于 2014-05-21 05:27:14
如果您在MVC应用程序中托管此服务,请确保添加以下行以忽略控制器路由冲突,我在挣扎了一段时间后遇到了这个问题,我找到了这个解决问题的答案。
routes.IgnoreRoute("{ allsvc }",新的{allsvc= @"..svc(/.*)?“});
https://stackoverflow.com/questions/11178111
复制相似问题