title: WCF Service : config address
body: <p>In my WCF Service <code>App.config</code> I have : </p>
  
  <pre><code>&lt;services&gt;
    &lt;service behaviorConfiguration="MyServiceWcfBehavior" name="MyService"&gt;
      &lt;clear /&gt;
      &lt;endpoint address="net.tcp://localhost:9999/MyService" binding="customBinding" bindingConfiguration="MyServiceTcpBinding" name="MyServiceWcfTcpEndpoint" contract="MyService.Contracts.Interfaces.IMy" /&gt;
    &lt;/service&gt;
  &lt;/services&gt;
  </code></pre>
  
  <p>And in my test-client <code>App.config</code> I have : </p>
  
  <pre><code>&lt;client&gt;
    &lt;endpoint address="net.tcp://localhost:9999/MyService" behaviorConfiguration="MyServiceEndpointBehavior" binding="customBinding" bindingConfiguration="MyServiceCustomTcpBinding" contract="MyService.Contracts.Interfaces.IMy" name="MyServiceWcfTcpEndpoint" /&gt;
  &lt;/client&gt;
  </code></pre>
  
  <p>Then I instantiate my <code>ServiceHost</code> like this : </p>
  
  <pre><code>var host = new ServiceHost(typeof(MyService),new Uri(net.tcp://localhost:9999/MyService));
  host.Open();
  </code></pre>
  
  <p>But on running my service and then testing with my client ( calling channel endpoint defined in my service ) I get runtime exception : </p>
  
  <blockquote>
    <p>System.ServiceModel.FaultException`1 was unhandled
    Action=<a href="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault" rel="nofollow noreferrer">http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault</a>
          HResult=-2146233087
          Message=The method or operation is not implemented.
          Source=mscorlib
          StackTrace:
            Server stack trace: 
               at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
    reply, MessageFault fault, String action, MessageVersion version,
    FaultConverter faultConverter)
               at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
    operation, ProxyRpc&amp; rpc)
               at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
    Object[] outs, TimeSpan timeout)
               at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
    methodCall, ProxyOperationRuntime operation)
               at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
    message)
            Exception rethrown at [0]: 
               at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
    reqMsg, IMessage retMsg)
               at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&amp;
    msgData, Int32 type)</p>
  </blockquote>