title: WCF Error "Found multiple X.509 certificates using search criteria"
body: <p>I receive following error when I try accessing a WCF service hosted on our staging server.</p>
  
  <p><em>"Found multiple X.509 certificates using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectName', FindValue 'StagingServer001'. Provide a more specific find value."</em></p>
  
  <p>I try to access the following URL and get above error:</p>
  
  <pre><code>http://stagingserver001/MyService1.svc
  </code></pre>
  
  <p>Could anyone please guide me how can I find the certificate in the store to delete it? Or what changes I need in configurations of WCF</p>
  
  <p>Please find below the the relevant code taken from web.config of the WCF service</p>
  
  <pre><code>&lt;behaviors&gt;
        &lt;endpointBehaviors&gt;
          &lt;behavior name="endpointCredentialBehavior"&gt;
            &lt;clientCredentials&gt;
              &lt;clientCertificate findValue="SPLEBUSSTG02" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /&gt;
              &lt;serviceCertificate&gt;
                &lt;defaultCertificate findValue="772f3fdf2496c9750be3b0713003b47b15dfde96" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" /&gt;
                &lt;authentication certificateValidationMode="PeerOrChainTrust" /&gt;
              &lt;/serviceCertificate&gt;
            &lt;/clientCredentials&gt;
          &lt;/behavior&gt;
        &lt;/endpointBehaviors&gt;
        &lt;serviceBehaviors&gt;
          &lt;behavior name="SecurityBehavior"&gt;
            &lt;serviceMetadata httpGetEnabled="True"  /&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
            &lt;serviceCredentials&gt;
              &lt;serviceCertificate findValue="772f3fdf2496c9750be3b0713003b47b15dfde96" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" /&gt;
              &lt;clientCertificate&gt;
                &lt;certificate findValue="SPLEBUSSTG02" storeLocation="LocalMachine" storeName="My" x509FindType="FindBySubjectName" /&gt;
                &lt;authentication certificateValidationMode="PeerOrChainTrust" /&gt;
              &lt;/clientCertificate&gt;
            &lt;/serviceCredentials&gt;
          &lt;/behavior&gt;
          &lt;behavior&gt;
            &lt;!-- To avoid disclosing metadata information, set the values below to false before deployment --&gt;
            &lt;serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" /&gt;
            &lt;!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information --&gt;
            &lt;serviceDebug includeExceptionDetailInFaults="false" /&gt;
            &lt;ServiceErrorHandler /&gt;
          &lt;/behavior&gt;
        &lt;/serviceBehaviors&gt;
  
      &lt;/behaviors&gt;
  </code></pre>