title: Confused regarding WCF identity dns value
body: <p>I'm confused about what the identity element on a client endpoint really does. I've understood that a identity dns value like  is supposed to tell WCF to assert that the service's certificate is issued to myserver.local. And that this should allow me to point the endpoint address to <a href="https://localhost/MyService.svc" rel="noreferrer">https://localhost/MyService.svc</a> instead of <a href="https://myserver.local/MyService.svc" rel="noreferrer">https://myserver.local/MyService.svc</a>.</p>
  
  <p>But this fails I don't understand why. I have myserver.local pointing to 127.0.0.1 in my host file and I have self-created certificate issued to myserver.local. It works fine with myserver.local but when I change the endpoint address to localhost it stops working because it "can't establish a SSL/TLS trust".</p>
  
  <p>Can anyone explain why?</p>
  
  <p>Thanks</p>