I'm having an issue deploying a WCF service to IIS on Windows Server 2016. The service needs a private key, which location is configured as follows:
<serviceCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" findValue="..." />
I'm getting the famous error "Keyset does not exist", so I googled and doubled checked permissions etc. The certificate is correctly placed in LocalMachine/Personal/Certificates. Primary Key export is allowed.
I granted primary key permissions to the APPPOOL identity and IIS_IUSRS. I evenn tried granting full access to "Everyone". I also tried running the application pool under my administrator account.
No luck.
I tried creating a small C# console application that reads the certificate, the primary key, and exports the primary key. That works.
So I'm out of options now. Any suggestions that might solve this?
certutil -store my
what do you see? If the certificate has private key associated there will be something likeEncryption test passed
orSignature test passed
. – pepoIIS APPPOOl\XYZ
whereXYZ
is the name of your pool. I set the permissions usingcertlm.msc
with right click on certificate then All tasks->Manage private keys. – pepo