title: WCF does not terminate call to Client
body: <p>I have a problem with a WCF service which is hosted on a Windows 2016 VM in Azure running in IIS 10.</p>
  
  <p>The service is basically a test service where I put in the operationContract a Thread.Sleep (timer) and the duration is sent as a parameter defined in the operationContract.</p>
  
  <p>The problem is that specifying a sleep duration of up to 4.2 seconds runs without problems, but if I call the service specifying 5 seconds to run. The task process ends at 5 seconds, with the code above, the internal logger notifies me that I am done but for some reason WCFTestClient is still waiting for a response and continues to wait until the configured timeout is reached. In this case I have my Receive_timeout and Send 10 minutes on both sides in the service config and in the client config.</p>
  
  <p>As proof I created a local environment in my network, mounting the service on a server, and here after 5 minutes or even a 9 minute test test client behaves as expected.</p>
  
  <pre><code>[OperationContract]
      public void TestServiceTimeout (int timer)
      {
          try
          {
              log.Info("Start test Service");
              System.Threading.Thread.Sleep(timer);
              log.Info("End test srervices");
          }
          catch (Exception ex)
          {
              log.Error($"An error ocurred. Details: {ex.Message}");
              throw;
          }
      }
  </code></pre>
  
  <p>Web.Config IIS</p>
  
  <pre><code>&lt;binding name="Control.ws.sTest.customBinding0" receiveTimeout="00:20:00" 
          sendTimeout="00:20:00"&gt;
        &lt;binaryMessageEncoding /&gt;
        &lt;httpTransport /&gt;
      &lt;/binding&gt;
  </code></pre>
  
  <p>
          
          
        </p>
  
  <p>WCFTestClient Config</p>
  
  <pre><code>&lt;bindings&gt;
          &lt;basicHttpBinding&gt;
              &lt;binding name="BasicHttpBinding_sFacturacion" sendTimeout="00:10:00" /&gt;
          &lt;/basicHttpBinding&gt;
      &lt;/bindings&gt;
      &lt;client&gt;
          &lt;endpoint address="http://localhost:60000/ws/sFacturacion.svc"
              binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_sFacturacion"
              contract="sFacturacion" name="BasicHttpBinding_sFacturacion" /&gt;
      &lt;/client&gt;
  </code></pre>