If you're spinning up a WCF service for testing in Visual Studio and you get the message "Could not establish trust relationship for the SSL/TLS secure channel with authority 'localhost:XXXXX'" then there is a simple 2 minute fix.
Take the URL of the svc file you are trying to access (e.g. https://localhost:XXXXX/MyService.svc) and past it into IE.
IE will prompt you saying the certificate is invalid. Accept this to carry on.
When your auto-generated service page comes up the address bar will be red. Click on the right end of the address bar (depending on the version of IE it may show a little red shield or say "Certificate Error". Click on View Certificates, then Install Certificate when it shows the details.
When to install into your User certificate store. You'll then be asked if you want to install it into the default location or somewhere else. Select the other location option and select "Trusted Root CA Authorities"
Job Done