I want to use namedpipeserver/client to communicate between two applications on two computers in a network. This network is a SOHO architecture, so security is of a lesser concern, we're just currently trying to get the system up and running.
I have written an Taskbar Application that opens up a server (on computer A) and a winform application that connects to the server (on computer B). Running both on the same computer gives me a functional interaction.
Trying it on two machines gives the error "System.IO.IOException: "Der Benutzername oder das Kennwort ist falsch." (in english: "The user or password are incorrect")
I have already searched high and low and found a few interesting articles such as:
Setting named pipe security in a Domain
Named pipe client unable to connect to server running as Network Service
NamedPipeClientStream can not access to NamedPipeServerStream under session 0
Named Pipes Across Network Gives "The user name or password is incorrect"
I changed my security settings for the server accordingly:
PipeSecurity pipeSa = new PipeSecurity();
// Set the pipesecurity
pipeSa.SetAccessRule(new PipeAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null),
PipeAccessRights.ReadWrite, AccessControlType.Allow));
// Alternative with "everyone"
// pipeSa.SetAccessRule(@"Jeder", PipeAccessRights.ReadWrite, AccessControlType.Allow));
serverPipeStream = new NamedPipeServerStream(
pipeName,
PipeDirection.InOut,
NamedPipeServerStream.MaxAllowedServerInstances,
PipeTransmissionMode.Message,
PipeOptions.Asynchronous,
10,
10,
pipeSa);
Alas without success. I also checked the port settings for the firewalls on both machines and cannot connect. Any hints on how to troubleshoot this issue further or what I am doing wrong would be greatly appreciated.