In my WCF Service App.config
I have :
<services>
<service behaviorConfiguration="MyServiceWcfBehavior" name="MyService">
<clear />
<endpoint address="net.tcp://localhost:9999/MyService" binding="customBinding" bindingConfiguration="MyServiceTcpBinding" name="MyServiceWcfTcpEndpoint" contract="MyService.Contracts.Interfaces.IMy" />
</service>
</services>
And in my test-client App.config
I have :
<client>
<endpoint address="net.tcp://localhost:9999/MyService" behaviorConfiguration="MyServiceEndpointBehavior" binding="customBinding" bindingConfiguration="MyServiceCustomTcpBinding" contract="MyService.Contracts.Interfaces.IMy" name="MyServiceWcfTcpEndpoint" />
</client>
Then I instantiate my ServiceHost
like this :
var host = new ServiceHost(typeof(MyService),new Uri(net.tcp://localhost:9999/MyService));
host.Open();
But on running my service and then testing with my client ( calling channel endpoint defined in my service ) I get runtime exception :
System.ServiceModel.FaultException`1 was unhandled Action=http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher/fault 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& 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& msgData, Int32 type)