无法添加服务引用

时间:2015-05-07 15:37:36

标签: wcf http wcf-endpoint

我无法连接到我们的开发服务器上托管的WCF服务,但我可以浏览它。 我只是想通过Visual Studio添加服务引用,当我点击Go时,它会给我以下错误。

收到http://...Service.svc的HTTP响应时发生错误。这可能是由于服务端点绑定不使用HTTP协议。这也可能是由于服务器中止HTTP请求上下文(可能是由于服务关闭)。有关详细信息,请参阅服务器日志。

我的其他同事可以添加服务引用并连接到此服务而不会出现任何问题,这使我更难理解此问题的原因。

Web.config - system.serviceModel:

<serviceHostingEnvironment multipleSiteBindingsEnabled="true"/> 

<bindings>
  <wsHttpBinding>
    <binding name="WSHttpBinding" maxReceivedMessageSize="2147483646">
      <readerQuotas maxStringContentLength="2147483646" />
      <security mode="None">
        <!-- **WARNING** Changes to the security binding must also be made in client binding code -->
        <transport clientCredentialType="None" proxyCredentialType="None" />
        <message clientCredentialType="None" />
      </security>
    </binding>
  </wsHttpBinding>
</bindings>


<services>
  <service name="X.X.X.RepositoryService" behaviorConfiguration="repositoryServiceBehavior">
    <endpoint address=""
    binding="wsHttpBinding" 
    bindingConfiguration="WSHttpBinding" 
    contract="X.X.X.ICatalogServiceContract" />
    <!-- ** NOTE Metadata not supported SSL at this time **-->

    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>

  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="repositoryServiceBehavior">
      <serviceDebug httpHelpPageEnabled="true" includeExceptionDetailInFaults="true" />


      <serviceMetadata httpGetEnabled="true" httpGetUrl=""/> 

      <dataContractSerializer maxItemsInObjectGraph="2147483646"/>



    </behavior>
  </serviceBehaviors>

</behaviors>

0 个答案:

没有答案