klone
klone

Reputation: 2075

Unable to find certificate by thumbprint

I am trying to create a WCF service secured by a certificate. For my POC work I created a self signed certificate using makecert utility and added the entry in web.config

I can see the certificate using certmgr in the personal store, and I copied the value of thumbprint from the certificate but when I type in the service's svc URL I get the error

Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'CurrentUser', FindType 'FindByThumbprint', FindValue 'thumbprint'.

I can even see the certificate programatically using the X509Store class but somehow I cannot configure my service to use it.

Upvotes: 1

Views: 4627

Answers (3)

klone
klone

Reputation: 2075

There is a configuration problem on my machine. I was able to deploy the solution on a different machine where it worked.

Upvotes: 0

Davin Tryon
Davin Tryon

Reputation: 67316

I would suggest double-checking that the user store you are looking at is for the same user that is running the AppPool of the WCF service endpoint. One thing you could try is to install the cert into local machine and see if it works. At least then you can know for certain one way or the other whether it is a permissions/user issue.

Upvotes: 0

Richard Blewett
Richard Blewett

Reputation: 6109

Assuming you are looking in the right store and location then it might be a problem withthe thumbprint string in Visual Studio

If you cut and paste the thumbprint from the MMC then you may well have control characters in the thumbprint string. Copy the string into notepad first and make sure you don't for example have a byte order mark (BOM) at the start of the string

If this doesn't work delete the thumbprint string entirely and retype it manually

Upvotes: 1

Related Questions