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
The correct thing to do is to setup your own Dev/Test Trusted Root Certificate and sign your client and service certificates with this.
Bypassing chain trust in your Dev/Test environment may "work" but your Dev/Test environment is now configured differently to Production, which is not a great idea as you may find some tests produce false positives or false negatives.