C#請求被中止提示錯誤:未能創(chuàng)建 SSL/TLS 安全通道”的原因及解決辦法
當前位置:點晴教程→知識管理交流
→『 技術(shù)文檔交流 』
代碼前加上如下代碼:ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls; ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true; ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | (SecurityProtocolType)0x300 //Tls11 | (SecurityProtocolType)0xC00; //Tls12 該文章在 2023/5/23 9:23:59 編輯過
|
關(guān)鍵字查詢
相關(guān)文章
正在查詢... |