WCF测试客户端EndPoint错误

时间:2013-11-20 14:28:48

标签: c# wcf

在我的WCF服务中,WCF测试客户端报告以下错误

System.InvalidOperationException: Could not find a base address that matches scheme net.tcp for the endpoint with binding NetTcpBinding. Registered base address schemes are [http].

我的App.Config是这样的:

<?xml version="1.0" encoding="utf-8" ?>

  

<services>
  <service name="Practicon.SAPServiceLibrary.SAPDownloadService" behaviorConfiguration="debug">
    <endpoint address="net.tcp://localhost:8082/SAPDownloadService" binding="netTcpBinding" contract="Practicon.SAPServiceLibrary.ISAPDownloadService">
      <identity>
        <dns value="localhost"/>
      </identity>
    </endpoint>

    <host>
      <baseAddresses>
        <!--add baseAddress="http://localhost:8083/Design_Time_Addresses/Practicon/SAPServiceLibrary/SAPDownloadService/"/> -->
        <add baseAddress="net.tcp://localhost:8082/SAPDownloadService"/>
      </baseAddresses>
    </host>
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="debug">
      <!-- To avoid disclosing metadata information, 
      set the values below to false before deployment -->
      <!--<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false"/>-->
      <!-- To receive exception details in faults for debugging purposes, 
      set the value below to true.  Set to false before deployment 
      to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="true"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

<client>
  <endpoint name="PracticonSAPDownloadEndPointClient"
            address="net.tcp://localhost:8082/SAPDownloadService"
            binding="netTcpBinding"
            bindingConfiguration="BindingConfiguration"
            contract="Practicon.SAPServiceLibrary.ISAPDownloadService">
    <identity>
      <servicePrincipalName value=""/>
    </identity>
  </endpoint>
</client>

<bindings>
  <netTcpBinding>
    <binding name="BindingConfiguration"
             transferMode="Buffered"/>
  </netTcpBinding>
</bindings>

我有一个net.tcp端点 - 服务运行正常,只是在WCF托管中报告了此错误。

有人可以解释我做错了什么以及如何纠正它?

由于

MM

0 个答案:

没有答案