I have a service running under a Network Service account. The service simply establishes a named pipe and listens for connections:
NamedPipeServerStream listeningPipe = new NamedPipeServerStream("ourservicepipe",
PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances,
PipeTransmissionMode.Message, PipeOptions.Asynchronous);
listeningPipe.BeginWaitForConnection(OnPipeConnected, listeningPipe);
I have an application running on a standard user account on the same machine. It tries to connect to the named pipe created by the service:
NamedPipeClientStream pipe = new NamedPipeClientStream(".", "ourservicepipe",
PipeDirection.InOut, PipeOptions.Asynchronous);
pipe.Connect(2000);
pipe.ReadMode = PipeTransmissionMode.Message;
When I call Connect, he ends up choosing InvalidOperationException. If I run the service on the same user, it connects perfectly. If I run the client as an administrator, it connects perfectly. This makes me think that the problem is related to permissions, but I do not know what permissions I need to set during installation.
, , ?