0

我有一个基于的 Duplex WFC 客户端,与单个客户端一起使用时效果很好。当我尝试将多个客户端连接到服务器时,就会出现问题。当我这样做时,我得到一个例外: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.

我这样定义我的端点:

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

并像这样添加我的客户端端点:

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

第一次连接没有问题,但是当我尝试以同样的方式连接第二个客户端时,会抛出上述异常。

有谁看到我做错了什么?

感谢进阶!

4

0 回答 0