I have a WCF Service using the following serviceCredentials:
<serviceCertificate
findValue="MyServiceCert" storeLocation="LocalMachine"
storeName="TrustedPeople" x509FindType="FindBySubjectName"/>
I installed the certificate using MMC (Certificates / Local Machine) in Trusted People (Local Machine) and the cert appears to b开发者_开发技巧e installed fine. However when running the application I get the following exception:
System.Security.Cryptography.CryptographicException: Keyset does not exist
Any ideas on how I can resolve this? Is it a permissions issue I'm overlooking?
This article says to "Manage Private Keys" but I can't find that any where in the MMC UI: http://64.4.11.252/en-us/library/ee662329.aspx
Manage Private Keys is accessible from context menu (right mouse click) in All tasks. But you can manage private key only for certificate which contains private key. You can easily identify if certificate has private key - it has different icon in MMC (with small key in corner). Also if you open the certificate you will see if it contains private key.
Btw. certificates with private key are usually stored in Personal / My store.
精彩评论