Trying to import the file fails, saying it already exists:

C:\Windows\system32>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis
   -pi "MyRsaKey" c:\key.xml
   Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
   Administration utility to install and uninstall ASP.NET on the local machine.
   Copyright (C) Microsoft Corporation.  All rights reserved.
   Importing RSA Keys from file..
   Object already exists.
   Failed!

But deleting it fails, saying it could not be found:

C:\Windows\system32>C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis
   -pz "MyRsaKey"
   Microsoft (R) ASP.NET RegIIS version 4.0.30319.17929
   Administration utility to install and uninstall ASP.NET on the local machine.
   Copyright (C) Microsoft Corporation.  All rights reserved.
   Deleting RSA Key container...
   The RSA key container was not found.
   Failed!
有帮助吗?

解决方案

The problem turned out to be related to the Permissions of the "C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys" folder.

Making sure the commands are executed using a user that belongs to the administrator group on the machine, and that the administrator group is the owner of that folder, enabled those commands to execute successfully.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top