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开发框架网发布内容,转载请附上原文出处连接
管理员
上一篇:C# 利用SharpZipLib对*.rar压缩文件解压报错
下一篇:VS调试运行ASP.NET MVC项目,上传静态资源图片404问题,Debug路径
评论列表

发表评论

评论内容
昵称:
关联文章

C#HTTP请求RestSharp.RestClient发起https请求
RestSharp请求https添加Cookie信息的正确姿势
C# HTTPHTTPS Get请求 和 Post 请求
C#利用CefSharp的ChromiumWebBrowser发起Post请求
C# RestSharp上传和下载图片
插入代码页面
Http请求中Referer的设置,CEFSharp带Referer请求
.NET中大型项目开发必备(9)--http请求调用(Post与Get)
使用.NET 6开发TodoList应用(10)——实现DELETE请求以及HTTP请求幂等性
【HttpHelper】HTTP Get和Post请求
WCF中常见的:The content type text
PC端编译 Empty block statement no-empty
html发布到服务器后部分jpg:net::ERR_BLOCKED_BY_CLIENT
支付宝支付:40003,三方应用未绑定服务商账号
EF 分页 SQL2008 Featch Next
.NET Core Winform 打开窗体设计器
EFCore链接数据库
Python windows服务: 1053:服务没有及时响应启动或控制请求
.Net启动程序:It was not possible to find any compatible framework version
C# 利用SharpZipLib对*.rar压缩文件解压

联系我们
联系电话:15090125178(微信同号)
电子邮箱:garson_zhang@163.com
站长微信二维码
微信二维码