I am trying to set up a Publish/Subscribe system using WCF and where the WCF server is in a Windows service. The binding is net.TCP. The service is providing a \"Subscribe
In the client code neither proxy created not channel factory. Service class instance is created as a class library.
You should consume service as below code
ServiceCallback serviceCallback = new ServiceCallback();
InstanceContext instanceContext = new InstanceContext(serviceCallback);
var pubsubProxy = new PubSubProxy.WcfPublisherContractClient(instanceContext);
pubsubProxy.Subscribe();
And when the service is running, OperationContext is created and you can access OperationContext.Current