I'm struggling to get a .NET (NOT a WCF) named pipe to communicate across the network. The MSDN documentation implies this is possible, nay trivial. But my code:
using (NamedPipeClientStream pipeClient = new NamedPipeClientStream(servername, "myPipe", PipeDirection.InOut, PipeOptions.None, TokenImpersonationLevel.Impersonation))
... works great when servername="localhost" and the pipe server is on the same box. But if it's another machine - regardless whether I make servername an IP address, DNS name, NetBIOS name, UNC path etc - means the pipe never connects. It doesn't actually fail, pipeClient.Connect() just sits there.
There's so many different and conflicting posts on various forums, blogs and sites about this. Can anyone set the record straight and tell me: how do I get a Named Pipe Client to connect from one C# application on one machine to a Named Pipe Server running on an another machine?
Are you doing this at work? Is a corporate firewall or anti-virus program running? Check the windows event logs and any applications in your task notification icons area on your start bar for hints as to who is blocking this.