I have the following code to setup a WCF service in code:
namespace Serviceman
{
public class Hostman
{
public Uri VServicesTCPAddress = new Uri("net.tcp://localhost:8000/v-services");
public ServiceHost VServicesHost = new ServiceHost(typeof(MyDemoService), new Uri("net.tcp://localhost:8000/v-services"));
public void ConfigureTcpService()
{
NetTcpBinding tcpBinding = new NetTcpBinding();
ServiceMetadataBehavior sMBehavior = new ServiceMetadataBehavior();
VServicesHost.Description.Behaviors.Add(sMBehavior);
VServicesHost.AddServiceEndpoint(typeof(IMetadataExchange),
MetadataExchangeBindings.CreateMexTcpBinding(), "mex");
VServicesHost.AddServiceEndpoint(typeof(IAccountsService), tcpBinding, VServicesTCPAddress);
}
}
}
I have started the service and it's working just fine, but when I connect multiple instances of my client, after some time I receive errors of having used all available channels. The question now is how can I increase the default value for connection pooling limit or even remove that?