Let's visit the documentation.
NamedPipeServerStream Class
Exceptions
IOException
The maximum number of server instances has been exceeded.
NamedPipeServerStream.MaxAllowedServerInstances Field
Represents the maximum number of server instances that the system
resources allow.
Remarks
Use the MaxAllowedServerInstances when creating a
NamedPipeServerStream object to set the maximum number of server
instances that the system resources allow.
In short the error is telling you that the maximum amount of instances has been created.
You will get this if you have used the default constructor with just the name, additionally you will get a pipe with the following characteristics:
A default pipe direction of InOut.
The maximum number of server instances that share the same name set to 1.
A PipeTransmissionMode value of Byte.
A PipeOptions value of None.
Default input and output buffer sizes.
No pipe security.
A HandleInheritability value of None.
No specified additional PipeAccessRights.
At minimum you would want to use the following constructor if you need more than one instance:
NamedPipeServerStream(String, PipeDirection, Int32)
Parameters
Lastly, if you are getting this error and you have only one instance, you probably have a subtle problem with how you are creating them.