Answer the question
In order to leave comments, you need to log in
C# how to fix xnet sll connection error?
Good time of the day, please help me solve the problem: when I try to make a request to the site sscasino.online gives an error
xNet.HttpException" в xNet.dll ("Не удалось установить SSL-соединение с HTTP-сервером 'sscasino.online'.") xNet.HttpException (xNET)
System.Net.WebException" в System.dll ("Базовое соединение закрыто: Непредвиденная ошибка при передаче.") System.Net.WebException (WebRequest)
request.UserAgent = useragent;
request.IgnoreProtocolErrors = true;
request.SslCertificateValidatorCallback += (sender, certificate, chain, sslPolicyErrors) => true;
var result = request.Get(link);
WebRequest req = WebRequest.Create(Url);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
StreamReader sr = new StreamReader(stream);
string Out = sr.ReadToEnd();
sr.Close();
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question