使用aspnet_regiis从文件导入RSA密钥



尝试导入文件失败,称其已存在:

C:Windowssystem32>C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_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!

但删除失败,称找不到:

C:Windowssystem32>C:WindowsMicrosoft.NETFrameworkv4.0.30319aspnet_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!

问题原来与"C:\Users\All Users\Microsoft\Crypto\RSA\MachineKeys"文件夹的权限有关。

确保使用属于计算机上管理员组的用户执行命令,并且管理员组是该文件夹的所有者,从而使这些命令能够成功执行。

最新更新