It might have permission issue: So, need to provide required access rights.
PipeSecurity _pipeSecurity = new PipeSecurity();
PipeAccessRule psEveryone = new PipeAccessRule("Everyone", PipeAccessRights.FullControl, System.Security.AccessControl.AccessControlType.Allow);
_pipeSecurity.AddAccessRule(psEveryone);
NamedPipeServerStream pipeServer = new NamedPipeServerStream(PipeName,
PipeDirection.In, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous, 4, 4, _pipeSecurity);
And to overcome the problem of listening only once follow this setp:
-> Right click on respective service > Properties > Log On > Log on as: Local System Account and tick Allow service to interact with desktop.
Or Go to ServiceProcessInstaller property and Set account as LocalSystem.
Cheers!!!