更新:我从另一个Web服务器获得了完全相同的配置。有什么想法为什么它适用于一个而不是另一个?
我有一个MVC网络应用程序,我正在尝试添加WCF服务引用。 WCF服务位于Web服务器上,我可以在浏览器(您创建服务)默认页面中提取服务。 VS for WCF中的测试客户端也可以使用该服务。我在尝试添加引用时收到以下错误...
没有端点侦听可以接受该消息。这通常是由不正确的地址或SOAP操作引起的。
这是我的服务配置模型...
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="Basic" sendTimeout="12:00:00" receiveTimeout="12:00:00" openTimeout="00:10:00" closeTimeout="00:10:00"
maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" messageEncoding="Mtom">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647"/>
</binding>
</basicHttpBinding>
</bindings>
<services>
<service behaviorConfiguration="TSRBehavior" name="TechnologyServiceRequestWCF.TSRWebService">
<endpoint address="~/TSRWebService.svc"
binding="basicHttpBinding"
bindingConfiguration="Basic"
name="Basic"
contract="TechnologyServiceRequestWCF.ITSRWebService" />
<endpoint address="mex"
binding="mexHttpBinding"
name="Metadata"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="TSRBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<serviceTimeouts transactionTimeout="24:00:00"/>
<serviceThrottling maxConcurrentCalls="100" maxConcurrentInstances="100" maxConcurrentSessions="100"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
还没有客户端配置,因为在成功与服务通信后,引用auto会为您生成。
答案 0 :(得分:0)
尝试删除mex端点并更改行
includeExceptionDetailInFaults =&#34;真&#34; 通过 serviceDebug includeExceptionDetailInFaults =&#34; false&#34;
答案 1 :(得分:0)
对于那些寻找适用于大多数人的简单配置的人来说,我的配置没有任何错误!我的问题最终成为绕过防火墙的移植问题。所以我没有错。 :)