Tuesday, August 2, 2011

WCF: Keyset does not exist exception

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...

  1. Start -> Run -> MMC
  2. File -> Add/Remove Snapin
  3. Add the Certificates Snap In
  4. Select Computer Account, then hit next
  5. Select Local Computer (the default), then click Finish
  6. On the left panel from Console Root, navigate to Certificates (Local Computer) -> Personal -> Certificates
  7. Right click on your certificate -> All Tasks -> Manage Private Keys
  8. Change the private key security settings.

No comments: