I\'m getting this error while attempting to make my WCF client and server talk to each other.
The X.509 certificate CN=localhost chain building faile
I fixed the problem by turning off validation in my code like this:
client.ClientCredentials.ServiceCertificate.Authentication.CertificateValidationMode = System.ServiceModel.Security.X509CertificateValidationMode.None;
Where client is an instance of my service reference.
client