Keyset does not exist

Problem You are trying to access the PrivateKey property of an X509Certificate object from within a web application hosted in IIS. You get the following exception: Keyset does not exist Stacktrace: System.Security.Cryptography.CryptographicException: Keyset does not exist at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean randomKeyContainer) at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle) at … More Keyset does not exist