WCF set keepAliveEnable=“false” not working RRS feed

  • Question

  • In my service I need to set keepAliveEnable=false in order to work with my load balancer. Therefore I followed instruction in this article. I did same thing mentioned in article but I am getting this error.

       <binding name="HttpBinding" keepAliveEnabled="False"/>
    The Scheme cannot be computed for this binding because this CustomBinding lacks a TransportBindingElement.  Every binding must have at least one binding element that derives from TransportBindingElement.

    Then I found set keepAliveFalse like below

        <binding name="HttpBinding" >
          <textMessageEncoding />
          <httpTransport  allowCookies="false"  keepAliveEnabled="false"/>

    In this method service is getting started normal and I can get the responses. But in request headers still shows connection as keep alive. (I checked using firebug) enter image description here

    1. What is the correct way of doing this?
    2. What is the end I need to set keep alive false (client or service) ?
    3. Am I checking keepAlive in wrong way?


    Friday, October 31, 2014 4:31 AM


  • Hi chapneox,

    I have used the following config file, it works well in my side:

           <binding name="CustomBinding" closeTimeout="00:00:45">
                  keepAliveEnabled="false" />
        <service name="YourService" behaviorConfiguration="YourServiceBehavior">
        <endpoint address="http://localhost:4050/..."

    First please try to make sure that you have applied the customBinding Configuration to the endpoint. Then could you please try to tell us if you are using the customBinding in your client side?

    Best Regards,
    Amy Peng

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, November 3, 2014 6:22 AM