ServiceHost AddServiceEndpoint - 多个连接

时间:2012-07-16 03:20:09

标签: c# wcf network-programming duplex-channel

我有一个基于this的双工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);

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

有谁看到我做错了什么?

感谢Adv!

0 个答案:

没有答案
相关问题