It is required to perform a simple GET request to the site using the HTTPS protocol, even if it is not valid. Here is an example site .
Host = "https://www.christopherleeco.com"; ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; }; ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12; HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Host); request.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) => { return true; }; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); string StausCode = response.StatusCode.ToString(); Stream resStream = response.GetResponseStream(); StreamReader readerStream = new StreamReader(resStream); string responseStream = readerStream.ReadToEnd(); I get an exception: System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. . Although if instead of this "host" insert https://www.google.com , the request is normal.
Host = "https://www.christopherleeco.com:443";then nothing changes - user217683