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

Written by wbarthol

February 18, 2006 at 7:16 pm

One Response

Subscribe to comments with RSS.

  1. Thanks. I’m using vs 2008, and this worked great.

    wilsonrtw

    June 22, 2009 at 10:39 pm


Leave a Reply