After hours by reading all questions about this issue, i have no other choice than posting by myself. I have a very simple C# code which return html code from URL :
string url = "https://www.google.fr";
var encoding = Encoding.GetEncoding("iso-8859-1");
using (WebClient client = new WebClient())
{
string html = new StreamReader(client.OpenRead(url), encoding).ReadToEnd();
Console.Write(html);
}
In most of case, this program return a result, except for some domains that causes an exception :
Mono.Security.Protocol.Tls.TlsException: The authentication or decryption has failed.
I tried everything from other issues, but no one can solve my problem. I have already tried to override like this :
ServicePointManager.ServerCertificateValidationCallback = delegate(object s, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { return true; };
The problem come from Mono, because the domains which doesn't work on Mono, work properly on Windows 10. How can I avoid this exception ?