1 2 3 4 5 6 7 |
// 忽略证书验证 if (AppConfig.HisUrl.StartsWith("https")) { ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true; } |