title: X.509 certificate can't find with "FindBySubjectName"
body: <p>After a brutal struggle with WCF Security, I think I'm at the final stage now and can see the light.</p>
  
  <p>I've got a Client certificate installed on my server, and is now, as advised, in the Trusted People folder of the certificate store.</p>
  
  <p>However, when I try and read the certificate application -> service, I get this error:</p>
  
  <blockquote>
    <p>Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType
    'FindBySubjectName', FindValue 'Forename Surname'.</p>
  </blockquote>
  
  <p>With the "Forename Surname" being the "Issued to" part of my certificate. In all tutorials I have seen, this is just one word; is this the problem? I received my certificate from my CA with these two words, with a space.</p>
  
  <p>Anyone ever come across this, is there something I'm blatantly doing wrong?</p>
  
  <p>Update, cert can be seen here:</p>
  
  <p><img src="https://i.stack.imgur.com/6XM9s.jpg" alt="enter image description here"></p>
  
  <p>Update: </p>
  
  <p>It gets even more strange:</p>
  
  <p>I installed Visual Studio on my web server, and used the following code to pick up the cert by Thumbprint: </p>
  
  <pre><code>var store = new X509Store(StoreName.TrustedPeople, StoreLocation.CurrentUser);
  store.Open(OpenFlags.ReadOnly);
  var certs = store.Certificates.Find(X509FindType.FindByThumbprint, "71995159BFF803D25BFB691DEF7AF625D4EE6DFB", false);
  </code></pre>
  
  <p>This actually RETURNS a valid result. When I put this information into the web.config of my service/client though, I still get the error.</p>