title: WCF net.tcp connection always fails
body: <p>I tried to setup a service for testing using a net.tcp binding. I also set a http endpoint. The configuration is as follows:</p>
  
  <pre><code>  &lt;system.serviceModel&gt;
      &lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="Inbound_REST"&gt;
            &lt;webHttp /&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="InboundHttpConfiguration"&gt;
            &lt;serviceMetadata httpGetEnabled="true" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
          &lt;behavior name="InboundTcpConfiguration"&gt;
            &lt;serviceMetadata httpGetEnabled="false" /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="true" /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
      &lt;/behaviors&gt;
      &lt;services&gt;
          &lt;service behaviorConfiguration="InboundTcpConfiguration" name="Inbound"&gt;
            &lt;endpoint address="" binding="netTcpBinding" contract="IContract"&gt;
              &lt;identity&gt;
                &lt;dns value="localhost"/&gt;
              &lt;/identity&gt;
            &lt;/endpoint&gt;
            &lt;host&gt;
              &lt;baseAddresses&gt;
                &lt;add baseAddress="net.tcp://localhost:6969/Inbound" /&gt;
              &lt;/baseAddresses&gt;
            &lt;/host&gt;
          &lt;/service&gt;
      &lt;/services&gt;
      &lt;serviceHostingEnvironment multipleSiteBindingsEnabled="true" /&gt;
      &lt;client&gt;
        &lt;endpoint name="httpEndPoint" address="http://localhost:1568/Inbound.svc" binding="basicHttpBinding" contract="IContract" /&gt;
         &lt;endpoint name="tcpEndPoint" address="net.tcp://localhost:6969/Inbound" binding="netTcpBinding" contract="IContract" /&gt;
      &lt;/client&gt;
      &lt;bindings&gt;
        &lt;basicHttpBinding&gt;
          &lt;binding name="httpbind"&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="None"/&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/basicHttpBinding&gt;
        &lt;netTcpBinding&gt;
          &lt;binding name="tcpbind"&gt;
            &lt;security mode="Transport"&gt;
              &lt;transport clientCredentialType="None" /&gt;
            &lt;/security&gt;
          &lt;/binding&gt;
        &lt;/netTcpBinding&gt;
      &lt;/bindings&gt;
    &lt;/system.serviceModel&gt;
  </code></pre>
  
  <p>When I attempt to consume the service using the net.tcp binding, it always return me the error:</p>
  
  <p><em>Could not connect to net.tcp://localhost:6969/Inbound. The connection attempt lasted for a time span of 00:00:00.9531494. TCP error code 10061: No connection could be made because the target machine actively refused it 127.0.0.1:6969.</em> </p>
  
  <p>By the way, the http binding works fine. I think it could be some machine configuration, but wasn't able to find what's the root cause.</p>