The RSA key container could not be opened

后端 未结 2 1472
悲&欢浪女
悲&欢浪女 2020-12-28 17:53

I\'ve been developing an ASP.NET site on an older machine running XP home. I recently got a new Win 7 PC and moved all my project files across. When I try and run the projec

相关标签:
2条回答
  • 2020-12-28 18:19

    I was facing the same issue, But running the commandprompt/powershell using administrator resolved the issue.

    0 讨论(0)
  • 2020-12-28 18:23

    If you still have access to the older machine, you could always decrypt the configuration section on that machine, then copy the unencrypted config file to the new machine (and, if necessary, re-encrypt the file on the old machine).

    On Windows 7, the account under which your IIS application pools run by default will likely be ApplicationPoolIdentity (as opposed to ASPNET). To grant permissions, try this:

    aspnet_regiis -pa RSAProviderName "IIS APPPOOL\DefaultAppPool" -full
    

    By the way, if you do decide to persevere with copying the key from the old machine to the new one, you should make sure that, when exporting, you export the private key data too:

    aspnet_regiis -px RSAProviderName C:\RSA_configkey.xml -pri
    

    And, optionally, to make the key data exportable during the import:

    aspnet_regiis -pi RSAProviderName C:\RSA_configkey.xml -exp
    
    0 讨论(0)
提交回复
热议问题