We are getting this error:
System.ServiceModel.ServerTooBusyException: The request to create a reliable session has been refused by the RM Destination. Server 'net.tcp://localhost:50000/' is too busy to process this request. Try again later. The channel could not be opened.
As I understand it, I need to increase the value of MaxPendingChannels in the ReliableSession binding.
However we configure WCF in code like this:
serviceHost = new ServiceHost(typeof(MyServiceClass));
ServiceEndpoint endPoint = serviceHost.AddServiceEndpoint(
typeof(IMyService),
new NetTcpBinding(SecurityMode.None, true),
endPointAddress);
So how do I set ReliableSession.MaxPendingChannels programmatically? (All the examples I can find use config files)
Search for MaxPendingChannels on this web page for one option, but it seems over complex.