I have a service running under the Network Service account. The service just sets up a named pipe and listens for connections:
NamedPipeServerStream listenin
Pipe server is created with the default service DACL so that only the administrator or system user can connect to the pipe. You need to set the pipe server with proper access rules to make all client connection to succeed. Below is the code to set the access rule to access everyone to access the pipe:
PipeSecurity pipeSa = new PipeSecurity();
pipeSa.SetAccessRule(new PipeAccessRule("Everyone",
PipeAccessRights.ReadWrite, AccessControlType.Allow));
listeningPipe.SetAccessControl(pipeSa);
It always better to define only a minimal set of users to access the pipe server to make it secure.