.net – Cannot find X.509 certificate using FindByThumbprint

netx509

I am getting the following error when I try to instantiate an instance of a third party web service client…

Cannot find the X.509 certificate using the following search criteria:
StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindByThumbprint', 
FindValue '[value in here]'.

The strange thing is that we have this working on another development machine, but it is steadfastly refusing to work on mine. We have added the certificate to the machine's certificate store in the same way (as far as we can tell) on each machine.

Can anyone offer any suggestions about how to troubleshoot this?

Best Answer

Maybe you don't have the certificate installed on that machine. Take a look on Internet Explorer (Tools | Internet Options | Content tab | Certificates) installed client certificates.

Under "Personal" tab you can see the installed certificates for you user account (as you are using the "My" store name). Double-clicking on an installed certificate under Details tab you have all information you can use on find value attribute, like the thumbprint.

Note that on Windows 10, the certificates are found in the local "Computer" store. On Windows Server 2008 R2 and below, they will be found in "Personal".