title: WCF service - connection was forcibly closed by the remote host
body: <p>For most clients this service works regular, but some clients very often get this error when making requests on this WCF service.</p>
  
  <p>(Note: WCF service send response but client doesn't get any data)</p>
  
  <blockquote>
    <p>System.ServiceModel.CommunicationException: An error occurred while
    receiving the <strong>HTTP</strong> response to <strong>https</strong>://xxxxx:1400/Exxxxxe.svc.
    This could be due to the service endpoint binding not using the HTTP
    protocol. This could also be due to an <strong>HTTP</strong> request context being
    aborted by the server (possibly due to the service shutting down). See
    server logs for more details.</p>
    
    <p>---> System.Net.WebException: The
    underlying connection was closed: An unexpected error occurred on a
    receive. ---> System.IO.IOException: <strong>Unable to read data from the
    transport connection: An existing connection was forcibly closed by
    the remote host</strong>.</p>
    
    <p>---> System.Net.Sockets.SocketException: An existing
    connection was forcibly closed by the remote host    at
    System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
    size, SocketFlags socketFlags)    at
    System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
    Int32 size)    --- End of inner exception stack trace ---    at
    System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
    Int32 size)    at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer,
    Int32 offset, Int32 count)    at
    System.Net.Security._SslStream.StartFrameHeader(Byte[] buffer, Int32
    offset, Int32 count, AsyncProtocolRequest asyncRequest)    at
    System.Net.Security._SslStream.StartReading(Byte[] buffer, Int32
    offset, Int32 count, AsyncProtocolRequest asyncRequest)    at
    System.Net.Security._SslStream.ProcessRead(Byte[] buffer, Int32
    offset, Int32 count, AsyncProtocolRequest asyncRequest)    at
    System.Net.TlsStream.Read(Byte[] buffer, Int32 offset, Int32 size)<br>
    at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32
    size)    at System.Net.Connection.SyncRead(HttpWebRequest request,
    Boolean userRetrievedStream, Boolean probeRead)    --- End of inner
    exception stack trace ---    at
    System.Net.HttpWebRequest.GetResponse()    at
    System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
    timeout)    --- End of inner exception stack trace ---</p>
    
    <p>Server stack trace:     at
    System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException
    webException, HttpWebRequest request, HttpAbortReason abortReason)<br>
    at
    System.ServiceModel.Channels.HttpChannelFactory`1.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan
    timeout)    at
    System.ServiceModel.Channels.RequestChannel.Request(Message message,
    TimeSpan timeout)    at
    System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message
    message, TimeSpan timeout)    at
    System.ServiceModel.Channels.ServiceChannel.Call(String action,
    Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
    Object[] outs, TimeSpan timeout)    at
    System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
    methodCall, ProxyOperationRuntime operation)    at
    System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
    message)</p>
  </blockquote>
  
  <p>Any idea? </p>