【发布时间】:2015-02-25 13:34:20
【问题描述】:
我想在my web.config 文件中加密connection string。我关注了this article,得到了加密的连接字符串。我遵循以下步骤
- 以管理员身份运行命令提示符
- 已到达
aspnet_regiis - Emcryted 使用命令
ASPNET_REGIIS -pef "connectionStrings" "D:\ProjPath"
它被加密了,但是当我运行我的应用程序时,我收到了这个错误
Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened.
在线<EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
我在本地机器上收到此错误意味着不可能出现机器密钥问题,当我使用ASPNET_REGIIS -pdf "connectionStrings" "D:\ProjPath" 解密它时,我得到了正确的连接字符串。
另外有没有办法加密DataConfig.Config文件中的连接字符串Sitefinity
【问题讨论】:
标签: c# asp.net encryption connection-string sitefinity