Syatem.Net.WebException:基础连接已经关闭:未能为 SSL/TLS 安全通道建立信任关系。

错误日志

---System.Security.Authentication.AuthenticationException:根据验证过程,远程证书无效。 在

System.Net.Security.SslState.StartSendAuthResetSignal(ProtocolToken message,AsyncProtocolRequest asyncRequest, Exception exception)System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message,AsyncProtoco1Request asyncRequest)System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes,AsyncProtocolRequest asyncRequest)Syatem.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)

System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message,AsyncProtocolRequSyatem.Net.WebException:基础连接已经关闭:未能为 SSL/TLS 安全通道建立信任关系。est asyncRequest) System.Net.Security.SslState.StartSendB1ob(Byte[] incoming, Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer,Int32 readBytes, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.CheckCompletionBeforeNextReceive(Protoco1Token message,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendBlob(Byte[] incoming,Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security. SslState. ProcessReceivedBlob (Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.CheckCompletionBeforeNextReceive (ProtocolToken message, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendB1ob(Byte[] incoming,Int32 count,AsyncProtoco1Request asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer,Int32 readBytes, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob (Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.CheckCompletionBeforeNextReceive (ProtocolToken message, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendB1ob (Byte[] incoming,Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame (Byte[] buffer, Int32 readBytes,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.CheckComp let ionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer, Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer,Int32 readBytes,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SalState.CheckCompletionBeforeNextReceive(ProtocolToken message,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendB1ob(Byte[] incoming, Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ProcessReceivedBlob(Byte[] buffer,Int32 count, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)System.Net.Security.SalState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.StartSendBlob(Byte[] incoming,Int32 count,AsyncProtocolRequest asyncRequest)System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)

System.Net.TlsStream.CallProcessAuthentication(Object state)

Syatem.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext,ContextCallback callback, Object state,Boolean preserveSyncCtx) System.Threading.Execut ionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state,Boolean preserveSyncCtx)

System.Threading.ExecutionContext.Run(ExecutionContext executionContext,ContextCallback callback, Object state) System.Net.TlsStream.Processhuthentication(LazyAsyncResult result)SystemNetTlsStreamWriteByte[] buffer, Int32 offset, Int32 size) 在SystemNetPooledStreamWriteByte[] buffer, Int32 offset, Int32 size) 在System.Net.ConnectStream.WriteHeadersBoolean async)

二、错误原因

本次服务是由Nginx从内网代理到外网,再从外网代理到内网,并在内网中通过ip和端口号进行访问。经过查询,是由于一个Nginx的协议修改后,并未对另一个Nginx进行修改。
Syatem.Net.WebException:基础连接已经关闭:未能为 SSL/TLS 安全通道建立信任关系。_第1张图片

三、解决办法

将两个Nginx的协议进行同步修改。

你可能感兴趣的:(nginx,ssl,安全,网络,nginx)