赞
踩
using System.Net;
using System.Security.Cryptography.X509Certificates;
using System.Net.Security;
public static bool CheckValidationResult(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
{ // 总是接受
return true;
}
ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback(CheckValidationResult);//验证服务器证书回调自动验证
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。