Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 668253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:01:10+00:00 2026-05-14T00:01:10+00:00

We are getting this error: System.ServiceModel.ServerTooBusyException: The request to create a reliable session has

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:01:11+00:00Added an answer on May 14, 2026 at 12:01 am

    This is what I did:

     private Binding CreateBindingWith_MaxPendingChannels_Set(Binding baseBinding)
     {
         BindingElementCollection elements = baseBinding.CreateBindingElements();
         ReliableSessionBindingElement reliableSessionElement = 
                    elements.Find<ReliableSessionBindingElement>();
         if (reliableSessionElement != null)
         {
             reliableSessionElement.MaxPendingChannels = 128;
    
             CustomBinding newBinding = new CustomBinding(elements);
    
             newBinding.CloseTimeout = baseBinding.CloseTimeout;
             newBinding.OpenTimeout = baseBinding.OpenTimeout;
             newBinding.ReceiveTimeout = baseBinding.ReceiveTimeout;
             newBinding.SendTimeout = baseBinding.SendTimeout;
             newBinding.Name = baseBinding.Name;
             newBinding.Namespace = baseBinding.Namespace;
             return newBinding;
         }
         else
         {
             throw new Exception("the base binding does not " +
                                 "have ReliableSessionBindingElement");
         }
     }
    

    …..

     Binding customBinding = CreateBindingWith_MaxPendingChannels_Set(
          new NetTcpBinding(SecurityMode.None, true));
    
     serviceHost = new ServiceHost(typeof(MyService));
     ServiceEndpoint endPoint = serviceHost.AddServiceEndpoint(
                        typeof(IMyService),
                        customBinding,
                        endPointAddress);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I keep getting this error randomly: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Server was unable to process request.
Getting this error with jquery & jquery.form. Site has been live for awhile..upgraded to
I'm getting this error The remote server returned an unexpected response: (400) Bad Request..
I'm getting this error: The communication object, System.ServiceModel.ChannelFactory`1[FxCurveService.IFxCurveService], cannot be used for communication because
I keep getting this error System.Web.HttpException was unhandled by user code Message=Validation of viewstate
Getting this weird LINQ error. title = System.Linq.Enumerable+WhereSelectEnumerableIterator`2[System.Xml.Linq.XElement,System.String Here is the code I have:
This is the error I am getting when typing ./configure : checking build system
Getting this error when try to add an item to my repositories/context: Collection has
I am getting this exception: The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication
I am getting this error: Server Error in '/cms' Application. This collection already contains

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.