C#HTTP请求RestSharp.RestClient发起https请求报错
C# RestSharp.RestClient发起https请求时返回总是空
response.Content总是空
查看response.ErrorMessage属性发现报错信息
The SSL connection could not be established, see inner exception.
或者报错信息
Request failed with status code InternalServerError
解决办法
C# 全选
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
或者试试
C# 全选
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
post 管理员