BKa*_*rms 6 asp.net encryption aspnet-regiis.exe rsacryptoserviceprovider
有加密问题.我向RSA文件夹的所有用户授予了完全权限.我做到了
C:\>aspnet_regiis -pe "appSettings" -location "web.config" -prov "RsaProtectedCo
nfigurationProvider"
Encrypting configuration section...
An error occurred executing the configuration section handler for appSettings.
Failed to encrypt the section 'appSettings' using provider 'RsaProtectedConfigur
ationProvider'. Error message from the provider: Object already exists.
Failed!
Run Code Online (Sandbox Code Playgroud)
然后我做了
C:\>aspnet_regiis -pa "NetFrameworkConfigurationKey" "administrator"
Adding ACL for access to the RSA Key container...
The RSA key container was not found.
Failed!
Run Code Online (Sandbox Code Playgroud)
其次是
C:\>aspnet_regiis -pc "NetFrameworkConfigurationKey" -exp
Creating RSA Key container...
The RSA key container could not be opened.
Failed!
Run Code Online (Sandbox Code Playgroud)
没有什么对我有用.
有人可以帮忙吗?
谢谢
小智 9
这次失败让我遇到了同样的问题:
aspnet_regiis -pa"NetFrameworkConfigurationKey""{Domain} {Username}"
上面一行返回"未找到RSA密钥容器".
要解决此问题,我必须以管理员身份运行命令提示符(打开"开始">"附件">然后右键单击"命令提示符"并选择"以管理员身份运行...").即使我的帐户是管理员帐户,我也必须这样做.
C:\>aspnet_regiis -pe "appSettings" -location "web.config"
-prov "RsaProtectedConfigurationProvider"
Run Code Online (Sandbox Code Playgroud)
在这一行中,您的位置不正确。当您使用-pd开关时,位置基于 IIS 的应用程序路径,并且 web.config 被假定为加密点。
例如,如果您在 IIS 中有一个名为“网站 1”的应用程序和另一个名为“网站 2”的应用程序,并且您希望对“网站 1”中的 web.config 进行加密,则可以使用以下行:
C:\>aspnet_regiis -pe "appSettings" -location "Website 1"
-prov "RsaProtectedConfigurationProvider"
Run Code Online (Sandbox Code Playgroud)
就我个人而言,我发现使用该-pef开关更容易,因为我可以直接指向网络应用程序的物理目录。
请遵循 MSDN 有关使用受保护的配置加密配置信息的教程。我已经使用过它多次,并且在加密方面还没有遇到问题。
| 归档时间: |
|
| 查看次数: |
10308 次 |
| 最近记录: |