WCF The underlying connection was closed: An unexpected error occurred on a receive

前端 未结 4 1456
忘掉有多难
忘掉有多难 2021-01-12 02:42

I am using a RestClient app to communicate with my WCF service .and I am getting the following exception

The underlying connection was closed: An unexpected         


        
4条回答
  •  无人共我
    2021-01-12 03:03

    I had similar errors coming from the depths of my http bindings in WCF.

    client -> The underlying connection was closed: An unexpected error occurred on a receive.

    client -> Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

    server (got this with the help of "procdump") -> The I/O operation has been aborted because of either a thread exit or an application request

    Eventually after many hours I came upon the HTTP.sys logging (in C:\WINDOWS\System32\LogFiles\HTTPERR ) and I discovered that the WCF self-hosted service connections were being forcibly dropped (on purpose) because of an obscure configuration issue (minimum send rate bytes per second). Unfortunately it took another few hours to reconfigure that (you cannot do it via "netsh http add timeout" so you have to do it within the app or within IIS when not self-hosted).

提交回复
热议问题