|
请求一个url:https://dsc.taobaocdn.com/i8/150 ... bk%3Bt%5E1516622821,报错未能创建SSL/TLS安全通道,已经在代码里面加了ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3;
ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(CheckValidationResult);
public static bool CheckValidationResult(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certificate, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors errors)
{ // 总是接受
return true;
}
,还是报错,用飞哥的万能框架测试结果是“未将对象引用设置到对象的实例。”,求解!
|
|