title: exposing net.tcp endpoint
body: <p>I'm a bit confused of how to expose an endpoint in WCF</p>
  
  <p>I've got a tcp endpoint and a mex tcp endpoint.</p>
  
  <pre><code>&lt;service name="MessageReaderService.MessageReaderService"&gt;
      &lt;endpoint name="NetTcpReaderService" 
          address="ReaderService" 
          binding="netTcpBinding" bindingConfiguration=""
          contract="Contracts.IMessageReaderService" /&gt;
      &lt;endpoint name="netTcpMex" 
          address="mex" 
          binding="mexTcpBinding" bindingConfiguration=""
          contract="IMetadataExchange" /&gt;
      &lt;host&gt;
         &lt;baseAddresses&gt;
             &lt;add baseAddress="net.tcp://localhost:8082" /&gt;
         &lt;/baseAddresses&gt;
      &lt;/host&gt;
   &lt;/service&gt;
  </code></pre>
  
  <p>When I try to run this in the service host I get the following exception :</p>
  
  <blockquote>
    <p>The contract name 'IMetadataExchange' could not be found in the list of contracts
    implemented by the service MessageReaderService. Add a ServiceMetadataBehavior to the<br>
    configuration file or to the ServiceHost directly to enable support for this contract.</p>
  </blockquote>
  
  <p>So I conclude from this error that I need to add a service behavior to expose metadata.</p>
  
  <p>So I added the behavior :</p>
  
  <pre><code>&lt;behavior name="ServiceBehavior"&gt;
      &lt;serviceMetadata httpGetEnabled="true"/&gt;                  
  &lt;/behavior&gt; 
  </code></pre>
  
  <p>but then I get a different error :</p>
  
  <blockquote>
    <p>The HttpGetEnabled property of ServiceMetadataBehavior is set to true and the 
    HttpGetUrl property is a relative address, but there is no http base address. Either 
    supply an http base address or set HttpGetUrl to an absolute address.</p>
  </blockquote>
  
  <ol>
  <li>So now I have to actually add another endpoint (http) to expose the metadata over mexhttpbinding ?</li>
  <li>is there a simple way to expose the endpoint over tcp ?</li>
  </ol>