От: | LandWarrior | ||
Дата: | 26.10.20 22:38 | ||
Оценка: |
ServicePointManager.Expect100Continue = true;
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12
| SecurityProtocolType.Ssl3
| (SecurityProtocolType)12288; // Tls13 = 12288
var webRequest = (HttpWebRequest)WebRequest.Create("https://shop.blackanddecker.ru/yandexmarket/index/bd");
webRequest.Method = "GET";
webRequest.Accept = "text/html, application/xhtml+xml, application/xml, gzip, deflate, br, application/x-rar-compressed, application/octet-stream, application/zip; q=0.9,image/webp,*/*;q=0.8";
webRequest.UserAgent = "Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:77.0) Gecko/20100101 Firefox/77.0";
webRequest.AddRange(0);
webResponse = (HttpWebResponse)webRequest.GetResponse();
responseStream = webResponse.GetResponseStream();
Error: The request was aborted: Could not create SSL/TLS secure channel.