我想发送一个简单的请求到"https://www.mexc.co/"
1.net version 4.8
2。这个网站用浏览器很容易打开
3。没有任何ssl验证错误或警告
result: The request was aborted: Could not create SSL/TLS secure channel.
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls13;// | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
HttpClient httpClient = new HttpClient();
string url = "https://www.mexc.co/";
var res = httpClient.GetAsync(url).Result;===>return an error:
如何解决这个问题?
.net 4.8不支持TLS13.
你可以使用BouncyCastle或OpenSSL或。net 5…