Podio - 现有连接被远程主机强行关闭

Podio - An existing connection was forcibly closed by the remote host

从今天开始,我们在向 Podio 发出 API 请求时收到以下错误:

An existing connection was forcibly closed by the remote host Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

堆栈跟踪:

Exception Details: System.Net.Sockets.SocketException: An existing connection 
was forcibly closed by the remote host

[SocketException (0x2746): An existing connection was forcibly closed by the remote host]
   System.Net.Sockets.Socket.EndReceive(IAsyncResult asyncResult) +82
   System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult) +57

[IOException: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.]
   System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) +232
   System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) +13
   System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) +119

[WebException: The underlying connection was closed: An unexpected error occurred on a send.]
   System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult) +623
   System.Net.Http.HttpClientHandler.GetResponseCallback(IAsyncResult ar) +64

[HttpRequestException: An error occurred while sending the request.]
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   System.Net.Http.<FinishSendAsync>d__58.MoveNext() +948
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<Request>d__36`1.MoveNext() +626
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.<Get>d__31`1.MoveNext() +307
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58
   PodioAPI.Services.<GetItem>d__6.MoveNext() +277
   System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +99
   System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +58

拜托,有人可以阐明这个问题吗?我们没有更改代码中的任何内容。这基本上才刚刚开始发生。在多个设备和位置进行了尝试,因此认为 Podio 端一定发生了一些变化。我们正在使用这里的库 - http://podio.github.io/podio-dotnet/

跑道已禁用 TLS 1.0 - 最后一点已于昨天完成。 TLS 1.0 不久前已被弃用,它的生命周期定于 2018 年 6 月。

详情在这里:https://help.podio.com/hc/en-us/community/posts/360003048772-API-Security-Update

跑道有一天也会禁用 TLS 1.1,所以如果你要升级 - 移动到最新的 TLS 1.2。

此外,现在发布了新版本的 nuget 包:

如果您的应用程序以 4.0 < 4.6 之间的 Dotnet Framework 为目标,那么您需要将默认的 SecurityProtocol 至少设置为传输层安全性 (TLS) 1.1,即

SecurityProtocolType.Tls11

参考: