im trying to transfer code from console app to uwp, in this console app used ServicePointManager that use all certificates, in uwp app i don`t use them and have exception with text - "A connection with the server could not be established".
The question is - how can i replace ServicePointManager and apply all certifates in uwp(because i don`t know what type of certificate used for this server).
Code of ServicePointManager is listed below:
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback
(bypassAllCertificateStuff);
private static bool bypassAllCertificateStuff(object sender, X509Certificate cert, X509Chain chain, System.Net.Security.SslPolicyErrors error)
{
return true;
}
Thanks for reply!