So I'm working with our sysadmin to setup on-premises authentication (with ADFS) for the web tool we're developing here.
I've gone through the setup process, and we're getting an exception when I run the project:
"The remote certificate is invalid according to the validation procedure."
[AuthenticationException: The remote certificate is invalid according to the validation procedure.]
System.Net.TlsStream.EndWrite(IAsyncResult asyncResult) +231
System.Net.PooledStream.EndWrite(IAsyncResult asyncResult) +15
System.Net.ConnectStream.WriteHeadersCallback(IAsyncResult ar) +119
ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(ValidateCertificate);
static bool ValidateCertificate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors errors)
Looking at Security Cert. Issuers...
Checking elements in X509 Chain:
A certificate chain processed, but terminated in a root certificate which is not trusted by the trust provider.
We've been able to solve the security certificate issue by installing the certificate on the ADFS server onto my dev machine under 'Trusted Root Certification Authorities'.