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 8013829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T19:44:32+00:00 2026-06-04T19:44:32+00:00

My service’s app.config <system.serviceModel> <client> <endpoint name=DataLocal address=net.tcp://SomeAddress binding=netTcpBinding contract=ISomeContract bindingConfiguration=TcpCustomSecurity behaviorConfiguration=SecureBehaviorName> <identity> <dns

  • 0

My service’s app.config

<system.serviceModel>
<client>
  <endpoint name="DataLocal" address="net.tcp://SomeAddress" binding="netTcpBinding" contract="ISomeContract" bindingConfiguration="TcpCustomSecurity" behaviorConfiguration="SecureBehaviorName">
    <identity>
      <dns value="localhost"/>
    </identity>
  </endpoint>
</client>
  <services>     
  <service name="SomeService">
    <host>
      <baseAddresses>
        <add baseAddress="http://SomeService" />
        <add baseAddress="net.tcp://SomeService" />
      </baseAddresses>
    </host>
    <endpoint name="SomeService_Normal" address="Secure" binding="netTcpBinding" contract="ISomeService" bindingConfiguration="TcpNormal"/>
  </service>
</services>
<bindings>
  <netTcpBinding>        
    <binding name="TcpNormal" transferMode="Buffered" receiveTimeout="24.20:31:23.6470000">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="None" />
    </binding>
    <binding name="TcpCustomSecurity" transferMode="Buffered" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="24.20:31:23.6470000" sendTimeout="00:01:00" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647" maxBufferPoolSize="2147483647">
      <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647"/>
      <security mode="Message">
        <message clientCredentialType="UserName"/>
      </security>
    </binding>
  </netTcpBinding>   
</bindings>
<behaviors>
  <endpointBehaviors>
    <behavior name="SecureBehaviorName">
      <clientCredentials>
        <serviceCertificate>
          <authentication certificateValidationMode="None"/>
        </serviceCertificate>
      </clientCredentials>
      <dataContractSerializer maxItemsInObjectGraph="2147483647"/>
    </behavior>
  </endpointBehaviors>
</behaviors>

Following are the stack statements for the error i am getting..

>          System.dll!System.Net.Sockets.Socket.Send(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x5a bytes 
        System.ServiceModel.dll!System.ServiceModel.Channels.SocketConnection.Write(byte[] buffer, int offset, int size, bool immediate, System.TimeSpan timeout) + 0xa7 bytes   
        System.ServiceModel.dll!System.ServiceModel.Channels.SocketConnection.Write(byte[] buffer, int offset, int size, bool immediate, System.TimeSpan timeout, System.ServiceModel.Channels.BufferManager bufferManager) + 0x34 bytes   
        System.ServiceModel.dll!System.ServiceModel.Channels.BufferedConnection.WriteNow(byte[] buffer, int offset, int size, System.TimeSpan timeout, System.ServiceModel.Channels.BufferManager bufferManager) + 0x90 bytes    
        System.ServiceModel.dll!System.ServiceModel.Channels.BufferedConnection.Write(byte[] buffer, int offset, int size, bool immediate, System.TimeSpan timeout, System.ServiceModel.Channels.BufferManager bufferManager) + 0x47 bytes 
         System.ServiceModel.dll!System.ServiceModel.Channels.FramingDuplexSessionChannel.OnSend(System.ServiceModel.Channels.Message message, System.TimeSpan timeout) + 0x115 bytes  
         System.ServiceModel.dll!System.ServiceModel.Channels.OutputChannel.Send(System.ServiceModel.Channels.Message message, System.TimeSpan timeout) + 0x81 bytes    
         System.ServiceModel.dll!System.ServiceModel.Dispatcher.DuplexChannelBinder.Request(System.ServiceModel.Channels.Message message, System.TimeSpan timeout) + 0x154 bytes  
        System.ServiceModel.dll!System.ServiceModel.Channels.ServiceChannel.Call(string action, bool oneway, System.ServiceModel.Dispatcher.ProxyOperationRuntime operation, object[] ins, object[] outs, System.TimeSpan timeout) + 0x206 bytes           
         System.ServiceModel.dll!System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(System.Runtime.Remoting.Messaging.IMethodCallMessage methodCall, System.ServiceModel.Dispatcher.ProxyOperationRuntime operation) + 0x59 bytes   
         System.ServiceModel.dll!System.ServiceModel.Channels.ServiceChannelProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage message) + 0x65 bytes            
        mscorlib.dll!System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(ref System.Runtime.Remoting.Proxies.MessageData msgData, int type) + 0xee bytes  

// First the service call in the above stack…

Service Behavior is this:
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single)]

The error occured after few hours of constant testing…unable to reproduce it while debugging..

EDIT:

I’ve got the tracing results thanks to Dejan…

on the first occurance of error i get this message: Maximum number of pending connections has been reached.

on the second occurance i get this message : The system hit the limit set for throttle ‘MaxConcurrentConnections’.Limit for this throttle was set to 200.Throttle value can be changed by modifying attribute ‘maxConcurrentSessions’ in service throttle element.

So for the second message i did this:

and assigned this service behavior to the service. do i need to set the maxConnections on the binding for the first message.Moreover, which is the root cause for the problem , first one or second one or both. Because in the subsequent messages i always get the second message.

Please guide to update my app.config to avoid such scenario.

UPDATE

I’ve got the tracing results…

on the first occurance i get this message: Maximum number of pending connections has been reached.

on the second occurance i get this message : The system hit the limit set for throttle ‘MaxConcurrentConnections’.Limit for this throttle was set to 200.Throttle value can be changed by modifying attribute ‘maxConcurrentSessions’ in service throttle element.

So for the second message i did this:

 <serviceBehaviors>
    <behavior name="tcpNormalBehavior">
      <serviceThrottling maxConcurrentSessions="800" maxConcurrentInstances="800" maxConcurrentCalls="200" />
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>
  </serviceBehaviors>

and assigned this service behavior to the service.
do i need to set the maxConnections on the binding for the first message.Moreover, which is the root cause for the problem , first one or second one or both. Because in the subsequent messages i always get the second message.

Please guide.

  • 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-06-04T19:44:33+00:00Added an answer on June 4, 2026 at 7:44 pm

    There is a possibilty that you have an unhandled exception such as stack overflow somewhere in your WCF service. If I get it correctly, the service works but stops working after a few hours.

    The first step to debugging a WCF service is WCF Tracing. Enable it, try to test your service and after it stops working again, there should be a trace entry in the .svclog file.

    EDIT
    Regarding your updated question: You get that exception because you are not closing the connection from the client side after you’re done with the call. Try refactoring your code so calls to WCF look like this:

    WCFProxy clientProxy = null;
    try
    {
        clientProxy = new WCFProxy();
        clientProxy.SomeCall();
        clientProxy.Close();
    }
    catch (Exception)
    {
        if (clientProxy != null)
        {
            clientProxy.Abort();
        }
        throw;
    }
    

    and then see if it will cause problems.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Service config <service name=Services.MyService> <host> <baseAddresses> <add baseAddress=net.tcp://localhost:9000/Services/MyService/ /> </baseAddresses> </host> <endpoint name=NetTcpService address=
Service - WCF Service Host - Windows Service Client - ASP.Net Web application I
Enterprise Service Bus (ESB), .NET Service Bus (Windows Azure AppFabric Service Bus), NServiceBus, RhinoServiceBus,
Any service that allows to geocode ip address to a location level accuracy in
WCF-service is hosted by ASP.NET web-site. ASP.NET Membership is not used in web-site. User
Our service tends to fall asleep during the nights on our client's server, and
The service in my app cant be always active, so i call startService() when
This service is hosted on Win2k8 R2 with wshttp binding and all security options
Web service wsdl contains following schema: <xs:complexType name=DocumentSearchInfo> <xs:sequence> ... <xs:element minOccurs=0 name=Industries nillable=true
My service bean example @Service(officeService) @Transactional public class OfficeService { @Resource(name = sessionFactory) private

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.