Skip to content

Instantly share code, notes, and snippets.

View Ciget's full-sized avatar
🎯
Focusing

Viktor Bilokin Ciget

🎯
Focusing
View GitHub Profile
try
{
Console.WriteLine(ServicePointManager.SecurityProtocol);
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls |
SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
ServicePointManager.Expect100Continue = true;
ServicePointManager.ServerCertificateValidationCallback +=
(sender, certificate, chain, sslPolicyErrors) => true; // ignoring certificate errors
Console.WriteLine(ServicePointManager.SecurityProtocol);
using (var client = new WebClient())