I am getting the following error when trying to perform a HttpWebRequest to a remote server over SSL (the url is https://sandbox.payfast.co.za):
"The remote certificate is invalid according to the validation procedure"
The certificate seems to be valid and I can successfully make a web request to another url.
Could someone tell me how the .NET validates the certificate and how I can find out the exact problem with the certificate.
To try and bypass this I added:
ServicePointManager.ServerCertificateValidationCallback
= (obj, certificate, chain, errors) => true;
But it seems this will not work in medium trust.
Any help appreciated.
Thanks Ben