简体   繁体   中英

Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding

My Web.Config is here:

 <system.serviceModel>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyServiceTypeBehaviors" >
      <serviceMetadata httpGetEnabled="true" />
    </behavior>
  </serviceBehaviors>
</behaviors>
<bindings>
  <basicHttpBinding>
    <binding name="basicHttpBindingConfig"/>
  </basicHttpBinding>
  <netTcpBinding>
    <binding name="netTcpBindingConfig"/>
  </netTcpBinding>
</bindings>
<services>
  <service name="testService.RaptorAPI">
    <endpoint address="mex" binding="mexTcpBinding" contract="testService.IRaptorAPI" listenUriMode="Explicit"/>
    <endpoint address="" binding="netTcpBinding" contract="testService.IRaptorAPI" bindingConfiguration="netTcpBindingConfig">
      <identity>
        <dns value="localhost" />
      </identity>
    </endpoint>
    <host>
      <baseAddresses>
        <add baseAddress="net.tcp://ccs-labs.com:802"/>
        <add baseAddress="http://ccs-labs.com:801"/>
      </baseAddresses>
    </host>
  </service>
</services>

Update 1 net.tcp is bound on IIS, The appropriate services are running.


Can someone find and correct the error " Could not find a base address that matches scheme net.tcp for the endpoint with binding MetadataExchangeTcpBinding. Registered base address schemes are [http]. "

Please try these steps

  1. Go to Server Manager > Features > Add Features. Here enable WCF Activation feature. Version of .NET Framework can vary on Windows version.

在此处输入图片说明

  1. In IIS find your website , navigate to Advanced Settings and update Enabled Protocols to "http,net.tcp".

在此处输入图片说明

  1. In IIS find your website , check your bindings for net.tcp port.

在此处输入图片说明

  1. Make sure you are not using IIS Express , because Express version does not support non-HTTP protocols.

It seems that your TCP is not enabled. The below post may help you find the solution. Enabling net.tcp in IIS7

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM