Not an option because System.Net.ServicePointManager.CertificatePolicy not available in UWP. If you use Windows.Web.Http.HttpClient instead, you can ignore self-signed certificates .
UPDATE:
The second time, you can ignore the errors of self-signed certificates by adding them to the root certificates of the application.
Two options:
Install it using the API:
IBuffer buffer = await FileIO.ReadBufferAsync(file); Certificate rootCert = new Certificate(buffer); CertificateStore rootStore = CertificateStores.TrustedRootCertificationAuthorities; rootStore.Add(rootCert);
Include it in Package.appxmanifest > Announcements > Certificates > Add and install:
- Store Name: root
- Content: path to certificate file
With either of the two options, you will stop receiving:
System.Net.WebException: The underlying connection was closed: Failed to establish trust for the SSL / TLS secure channel. ---> System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the verification procedure.
source share