url (with redirect)- no secerity, no SSL/TLS (HTML 1.1, http) In Visual Studio I have no Errors (compiled, without protection).
Code: Select all
WebClient webClient = new WebClient();
webClient.Headers.Add(HttpRequestHeader.UserAgent, Agent);
content = await webClient.DownloadStringTaskAsync(url);
I tried to add (before and after new Weblicent()):
Code: Select all
ServicePointManager.Expect100Continue = true;
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11| SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;
Code: Select all
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 (and with Ssl3)