When testing a newly developed WCF Service, the webservice call fails with a CryptographicException including the following
message:
"Keyset does not exist"
This is not the most helpful error but some googling around revealed that issue was caused because the IIS user didn’t had access to the private key for the webservice certificate.
You can solve this by following these steps...
- Start -> Run -> MMC
- File -> Add/Remove Snapin
- Add the Certificates Snap In
- Select Computer Account, then hit next
- Select Local Computer (the default), then click Finish
- On the left panel from Console Root, navigate to Certificates (Local Computer) -> Personal -> Certificates
- Right click on your certificate -> All Tasks -> Manage Private Keys
- Change the private key security settings.