业务需要调用第三方https,本地好好的,部署到服务器上报错。
服务器版本 window server 2012 r2
错误信息
.net core
System.AggregateException:One or more errors occurred. (The SSL connection could not be established, see inner exception.)
内部错误System.Security.Authentication.AuthenticationException:Authentication failed, see inner exception.
内部错误System.ComponentModel.Win32Exception Message:接收到的消息异常,或格式不正确。
.net framework
“未能创建 SSL/TLS 安全通道”
尝试各种版本SSL/TLS,指定版本,不指定版本。无果。
网上搜索解决方案
重置winsock。执行命令:netsh winsock reset 并重启服务器。无效。
windows服务器打补丁。无效。
最后部署到windows server 2016上。问题解决。