sub = "https://www.sosyachting.com"; ServicePointManager.ServerCertificateValidationCallback = new System.Net.Security.RemoteCertificateValidationCallback(AcceptAllCertifications); ServicePointManager.Expect100Continue = true; ServicePointManager.SecurityProtocol = (SecurityProtocolType)(0xc0 | 0x300 | 0xc00 | 0x30); //tls,tls1.1,tls1.2,ssl3 System.Net.WebClient wc = new System.Net.WebClient(); byte[] raw = wc.DownloadData(sub); string webData = System.Text.Encoding.UTF8.GetString(raw);
public bool AcceptAllCertifications(object sender, System.Security.Cryptography.X509Certificates.X509Certificate certification, System.Security.Cryptography.X509Certificates.X509Chain chain, System.Net.Security.SslPolicyErrors sslPolicyErrors) { return true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)