Search code examples
.netwcfnamed-pipes

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?


Solution

  • A base address can only be used by one application on a computer.

    enter image description here

    But if different users log in to the same Windows Server, each user will encounter a unique Windows computing session. You can think of each user logging in to their own computer, and these users will not interfere with each other.

    For more information about "MultiPoint Services", you can refer to this link.