如何使用 regiis_asp.net 解密 web.config 中的连接字符串?
我尝试过在 cmd 中使用此命令,但它不起作用,
c:/path.../regiis_asp.net -pi "connectionString" -app "d:/myWebSiteApp"
该命令的结果是
the configuration section "connectionString" was not found
failed
I have tried using this command in cmd but it didn't work
c:/path.../regiis_asp.net -pi "connectionString" -app "d:/myWebSiteApp"
the result of that command was
the configuration section "connectionString" was not found
failed
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
你试过这样吗?:
加密:
解密:
Have you tried it this way?:
Encrypt:
Decrypt:
如果您的目的是解密 web.config 中的 connectionStrings 部分,则必须使用以下命令。
注意:在您提供的代码中,请注意以下内容
1) 实用程序命令是 aspnet_regiis 而不是 regiis_asp.net
2) 由于您的应用程序是从物理路径引用的,容器配置必须是-pdf而不是-pi
3)节名称是connectionStrings而不是connectionString (注意's')
如果您尝试从虚拟路径解密,则命令必须如下所示
If your intention is to decrypt the connectionStrings section in the web.config, you will have to use the below command.
Note: in the code provided by you, please note the following
1) the utility command is aspnet_regiis instead of regiis_asp.net
2) Since your app is referred from the physical path, the container configuration must be -pdf instead of -pi
3) The section name is connectionStrings instead of connectionString ( notice the 's')
If you are trying to decrypt from the virtual path then the command must be as below
刚刚有了这个,结果发现它不需要在连接字符串周围使用双引号。
Just had this and it turned out that it didn't want the double quotes around connectionStrings.