I have a program that run in a loop, each iteration runs in a different thread and I'm creating new process that open new service host:
ServiceHost _host = new ServiceHost(_service, new Uri("net.pipe://localhost/" + i_PipeName));
_host.AddServiceEndpoint(typeof(ICommandService), new NetNamedPipeBinding() { TransferMode = TransferMode.Buffered }, i_PipeName);
_host.Open();
from my main program I connect to the open .net pipe at the following way:
ICommandService ServiceProxy = ChannelFactory<ICommandService>.CreateChannel
(new NetNamedPipeBinding(), new EndpointAddress(@"net.pipe://localhost/" + i_PipeName" + @"/" + i_PipeName));
So my problem is that for the first 200+ proccess/iterations it working fine, I can open connection and pass messages but later on there errors that starts to appear:
There was no endpoint listening at net.pipe://localhost/pipea0360/pipea0360 that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException if present, for more details.
My question is if there are any limitations on the number of pipes I can open in parallel?
Is this because I open so many proccesses?