C # When simulating an Http request, the basic connection is closed and the trust relationship cannot be established for the SSLTLS security channel,
// Solution: // introduce the namespace: using System. security. cryptography. x509Certificates; using System. net. security; // definition method: private static bool RemoteCertificateValidate (object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error) {// To Pass certificate verification, true return true is always returned ;} // call Method 1: // call static WxRequest () in the constructor {// call the callback function ServicePointManager for obtaining the verification certificate. serverCertificateValidationCallback + = RemoteCertificateValidate;} // Method 2: // call ServicePointManager before a WebRequest. serverCertificateValidationCallback + = RemoteCertificateValidate;