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

netwcfwcf-binding

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]."

Best Answer

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.

enter image description here

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

enter image description here

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

enter image description here

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