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

  • Question

  • User2006903509 posted

    I have been using http for all these and when i am working with net.tcp and when adding the reference i am getting an error like

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

    my web.config

    <?xml version="1.0"?>
    <configuration>
    
      <system.web>
        <compilation debug="true" targetFramework="4.0" />
      </system.web>
      <system.serviceModel>
        <services>
          <service behaviorConfiguration="servicebehave" name="WcfServ.Service1">
            <endpoint address="" binding="netTcpBinding" 
              bindingConfiguration="" name="nettcp" contract="WcfServ.IService1" />
    
            <endpoint address="mex" binding="mexTcpBinding" bindingConfiguration=""
              name="mex" contract="IMetadataExchange" />
            <host>
              <baseAddresses>
                <add baseAddress="net.tcp://localhost:51560/Service1.svc" />
               <add baseAddress="http://localhost:8080/Service1.svc"/>
              </baseAddresses>
            </host>
          </service>
        </services>
        <bindings>
          <netTcpBinding>
            <binding name="netTcpBinding">
              <security mode="Transport" />
            </binding>
          </netTcpBinding>
    
        </bindings>
        <behaviors>
          <serviceBehaviors>
            <behavior name="servicebehave">
              <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
              <serviceMetadata httpGetEnabled="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="false"/>
    
            </behavior>
          </serviceBehaviors>
        </behaviors>
        <serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
      </system.serviceModel>
     <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
      </system.webServer>
    
    </configuration>



    Monday, September 2, 2013 10:43 AM

All replies

  • User260886948 posted

    Hi,

    The two of the endpoints use the netTcpBinding and mexTcpBining which all are over the tcp. So please try to remove the following line from your web configure file:

    <add baseAddress="http://localhost:8080/Service1.svc"/>
    

    Then it will works.

    Best Regards.

    Tuesday, September 3, 2013 1:42 AM