0

I have a Duplex WFC client based on this which, when used with a single client works fine. The problem arises when I try to connect more than one client to the server. When I do, I get an exception: There was no endpoint listening at net.tcp://localhost:9080/MyDataService/1617f081e4b04c288965eea6ae18a39f that could accept the message. This is often caused by an incorrect address or SOAP action.

I define my endpoint like this:

ServiceHost duplex = new ServiceHost(typeof(ServerWCallbackImpl));

and add my client endpoint like this:

duplex.AddServiceEndpoint(typeof(IServerWithCallback), new NetTcpBinding(), uniqueEndpointAddress);

There is no problem with the first connection but when I attempt to connect with a second client in the same way, the above exception is thrown.

Does anyone see what I'm doing wrong?

Thanks in Adv!

Pat Mustard
  • 1,852
  • 9
  • 31
  • 58
  • Does it throw immediately or does it wait a few seconds? (Where a few seconds == whatever your client timeout is set to) – Eric Fleischman Jul 16 '12 at 03:22
  • It seems as though the ServiceHost will accept only one Endpoint. – Pat Mustard Jul 16 '12 at 03:27
  • You can try to turn up concurrency in the service host, but I wouldn't expect it to throw immediately if it were the normal service host concurrency knobs. Unfortunately WCF hasn't made this easy for you, with concurrency knobs in a bunch of places. A search for ServiceThrottlingBehavior should help. – Eric Fleischman Jul 16 '12 at 03:30
  • So you are running multiple clients on the same machine? Do you have Net.Tcp port sharing service running? – Ladislav Mrnka Jul 16 '12 at 09:45
  • Thanks Ladislav, that helped! I never knew that setting was even there. However, I find that if I have a channel already streaming data when I add another, the second seems to cancel out the data from the 1st subscription. Any ideas what might cause this? – Pat Mustard Jul 18 '12 at 09:59

0 Answers0