ServicePointManager.ServerCertificateValidationCallback = ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback( delegate { return true;//https请求 忽略证书,可以直接访问 } );
ServicePointManager.ServerCertificateValidationCallback = ServicePointManager.ServerCertificateValidationCallback = new RemoteCertificateValidationCallback( delegate { return true;//https请求 忽略证书,可以直接访问 } );