首页 > 解决方案 > WCF NetNamedPipeBinding - Same pipe name and different users

问题描述

I struggle a bit with the following. I create a WCF server like:

new ServiceEndpoint(ContractDescription.GetContract(typeof(IMyService)), new NetNamedPipeBinding(), new EndpointAddress("net.pipe://localhost/MyService"));

On an Windows Server OS the first user runs the code and so starts the server. Then the second user logs in and runs the same code. As I understand the documentation of named pipes, it is not possible to create a named pipe with the same name on the same machine. So according to the documentation an exception should have been raised. But it isn't. The second user executes the code and is able to start the second server with the same endpoint address on the same machine. Do I misinterpret the documentation?

标签: .netwcfnamed-pipes

解决方案


基地址只能由计算机上的一个应用程序使用。

在此处输入图像描述

但是如果不同的用户登录到同一个 Windows Server,每个用户都会遇到一个唯一的 Windows 计算会话。你可以想象每个用户都登录到自己的电脑上,这些用户之间不会互相干扰。

有关“MultiPoint 服务”的更多信息,您可以参考此链接


推荐阅读