当我尝试创建机器作用域CNG键时:
CngKey.Create(CngAlgorithm2.Rsa, "TestKey", new CngKeyCreationParameters
{
KeyCreationOptions = CngKeyCreationOptions.MachineKey
});我得到了
System.Security.Cryptography.CryptographicException: Access denied.
at System.Security.Cryptography.NCryptNative.FinalizeKey(SafeNCryptKeyHandle key)
at System.Security.Cryptography.CngKey.Create(CngAlgorithm algorithm, String keyName, CngKeyCreationParameters creationParameters)它在作为管理员运行时工作,但我需要在AD用户帐户下这样做,而不将该用户添加到本地管理员。
授予创建CNG密钥的权限是什么?在哪里可以设置这些权限?
发布于 2015-09-28 19:42:13
找到答案了。应授予用户对%ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\Keys的修改权限。
https://stackoverflow.com/questions/32830153
复制相似问题