Click here to Skip to main content
15,891,431 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am using net.tcp protocol as a binding to my WCF service but when i run the project i am getting this error

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

XML
<?xml version="1.0"?>
<configuration>

  <system.web>
    <compilation debug="true" targetFramework="4.0" />
  </system.web>
  <system.serviceModel>
    <services>
      <service behaviorConfiguration="servicebehave" name="NETTCP.Service1">
        <endpoint address="" binding="netTcpBinding"
          bindingConfiguration="" name="nettcp" contract="NETTCP.IService1" />
        
        <endpoint address="netTcpMex" binding="mexTcpBinding" bindingConfiguration=""
          name="netTcpMex" contract="IMetadataExchange" />
        <host>
          <baseAddresses>
            <add baseAddress="net.tcp://localhost:8181"/>
            <add baseAddress="http://localhost:8181/Service1.svc"/>
            
          </baseAddresses>
        </host>
      </service>
    </services>
    <behaviors>
      <serviceBehaviors>
        <behavior name="servicebehave">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="false" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
  </system.serviceModel>
 <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
  </system.webServer>
  
</configuration>
Posted
Updated 20-Aug-13 23:23pm
v2
Comments
virusstorm 22-Apr-15 13:26pm    
I believe your issue is you have both NET.TCP and HTTP defined on the same port. I know for a fact you can't have both binding listening on the same port. The server has no way to differentiate between the requests.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900