问题
Since yesterday I haven't been able to generate strong name keys using sn.exe or through Visual Studio which also uses sn.exe.
When attempting to generate a key file the following cimmand is executed
sn - k "key file.snk"
sn.exe then responds with
Failed to generate a strong name key pair -- Access is denied.
After repeating this process while running Process Monitor I now know that the locations to which sn.exe is denied access all reside within the following directory
\ProgramData\Microsoft\Crypto\RSA\MachineKeys
Querying the permissions of this folder reveals that the Everyone and Administrators groups have no rights and the NETWORK SERVICE account has Full Control.
Yesterday, I installed SourceGear Fortress which does use the NETWORK SERVICE account, however that is the only sicnificant change to the system prior to the issue occuring.
Is it normal for Everyone and Administrators to have no rights to the RSA key store?
回答1:
After restoring Read and Write permissions to my user account for the MachineKeys directory I was again able to generate keys
来源:https://stackoverflow.com/questions/1024834/rsa-key-store-permissions