加密/解密 - web.config connectionString [英] Encrypting/Decrypting - web.config connectionString
问题描述
我正在尝试加密网络配置文件中的connectionStrings。
我在VS命令提示符下尝试了以下命令来加密连接字符串
> aspnet_regiis.exe -pefconnectionStringsD:\ MyFolder
但我收到以下错误消息
无法使用提供商'RsaProtect加密'connectionStrings'部分
nfigurationProvider'。来自提供者的错误消息:对象已经存在
失败!
如何解决?
谢谢
--SJ
Hi,
I am trying to encrypt the connectionStrings in a web config file.
I tried following command in VS command prompt to encrypt the connection string
>aspnet_regiis.exe -pef "connectionStrings" "D:\MyFolder"
but i got following error message
Failed to encrypt the section 'connectionStrings' using provider 'RsaProtect
nfigurationProvider'. Error message from the provider: Object already exists
Failed!
How to resolve it?
Thanks
--SJ
推荐答案
使用asp在web.config文件中加密或解密连接字符串。 net。 [ ^ ]
在app.config和/或web.config中加密和解密ConnectionString! [ ^ ]
尝试使用管理员运行cmd
try to run cmd with administrator
这篇关于加密/解密 - web.config connectionString的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!