Friday, December 09, 2005

Uninstalling Existing StrongName Keys with sn.exe Created By Other Users

When trying to a strongname in Windows XP with sn.exe -d, we got an "8013141C" error - "Failed  to install  key  pair  -- Object  already  exists.".  This was caused by having the same key installed under a different domain, domain user, or local user account.

The hack to fix this is:
  1. Browse to  %SystemDrive%\Documents and  Settings\AllUsers\ApplicationData\Microsoft\Crypto\RSA\MachineKeys
  2. Grant rights to Adminstrators, or whatever group you belong  to
  3. Take Ownership of this folder (click Advanced under Security, and then click the Ownership tab at the top)
  4. Apply the changes to the children ("Replate permission...")

No comments: