(转)Resolving errors creating a Strong Name Key

William Bartholomew

Musings on software engineering, technology and Aspergers Syndrome.

Resolving errors creating a Strong Name Key

with one comment

When creating a strong-name key in the “Signing” properties tab of Visual Studio 2005 (aka VS2005 or Whidbey) you may receive a “The operation could not be completed” error message, alternatively using the “sn.exe -k” command-line utility you may receive a “Failed to generate a strong name key pair — Access is denied.” error message.

These errors are usually caused by insufficient permissions to the “%ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\RSA\MachineKeys” folder, and will most likely arise when running as a non-administrator user.

To resolve this, you can run the cacls.exe tool as an administrator to grant the required permissions:

cacls.exe "%ALLUSERSPROFILE%\Application Data\Microsoft\Crypto\RSA\MachineKeys" /E /G username:F

posted on 2010-09-29 15:27  沸石  阅读(199)  评论(0编辑  收藏  举报

导航