在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
https, 在WIN7 下如果服务器断没有启用tls1.0, 那webClient 请求就会失败, 问题解决方案 https://stackoverflow.com/questions/2859790/the-request-was-aborted-could-not-create-ssl-tls-secure-channel try string testUrl = "https://www.baidu.com/"; testUrl = "https://www.thoughtco.com/swimming-4132739";//不用上面代码就会失败,error:The request was aborted: Could not create SSL/TLS secure channel. WebClient wc = new WebClient(); richTextBox1.Text = "error:" + ex.Message; ----------------------------------------------------------------------------------------------------- The solution to this, in .NET 4.5 is ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; -------------------------------------------------------------------------------------------------------
很遗憾的是这个在XP下还是不行。 。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论