I get the following error when trying to execute HttpWebRequest on a remote server via SSL (url https://sandbox.payfast.co.za ):
"The remote certificate is invalid according to the verification procedure"
The certificate is valid and I can successfully make a web request to a different URL.
Can someone tell me how .NET verifies the certificate and how I can find out the exact problem with the certificate.
To try and get around this, I added:
ServicePointManager.ServerCertificateValidationCallback = (obj, certificate, chain, errors) => true;
But it seems that this will not work in conditions of trust in the environment.
Any help was appreciated.
Thanks Ben
source share