I just got the following error while calling an API. "Could not establish trust relationship for the SSL/TLS secure channel"
I fixed it with the RemoteCertificateValidationCallback class:
ServicePointManager.ServerCertificateValidationCallback +=
new RemoteCertificateValidationCallback(Helpers.CertificateHelper.ValidateCertificates);
And there I just applied a snippet of code found here: How to verify X509 cert without importing root cert?
Now its working fine, but.. Is this the way to go? Is it okay, or should I not use this method?