System.Exception: No certificate was found in the cert store for user

05 Mar

Recently I’ve wrote about certificate problem in WCF applications. Here is another one:
When starting WCF application the following error is logged Event ID: 0

Internal exception occured: System.Exception: No certificate was found in the cert store for user: comp_1\WCF_AppUser

So first lets see what certificate is the application looking for. Locate the application files and open application config file with notepad.
Now search for serviceCertificate you should see the line like below:
<serviceCertificate storeLocation=”LocalMachine” storeName=”My” x509FindType=”FindBySubjectName” findValue=”*.domain.local”/>

As you can see the application is looking for * wildcard certificate called *.domain.local
Open Certificates management console and make sure that the certificate named in config file is there. If not, you need to import it.

Now if the certificate was already installed or after importing it the application still would not start then open a config file again and look for the thumbprint line Crypto-CertThumbPrint:
<add key=”Crypto-CertThumbPrint” value=”456bc79ed7852d23365f64187648916187b8781c”/>

Open the certificate that you have installed on the machine and select details tab find the thumbprint ant compare it to the one in the config file.

If the the thumbprints don’t match then replace the thumbprint in config file with the one in the certficate. Save config file and try starting application.

Hope this helps

Leave a Reply

IT Blog

Just another blog on Kozeniauskas.com Network