【发布时间】:2021-09-11 05:14:21
【问题描述】:
我正在尝试使用 ASPNET_RegIIS.exe 来加密 web.config 中的
aspnet_regiis.exe -pdf "applicationSettings" .
我得到的结果是:
Decrypting configuration section...
The configuration section 'applicationSettings' was not found.
Failed!
我在 web.config 文件中肯定有
<configSections> Failed.
<appSettings> Success.
<connectionStrings> Success.
<system.web> Failed.
<runtime> Failed.
<system.codedom> Success.
所以我想,也许 ASPNET_RegIIS.exe 只能加密一组预定义的节名。为此,我通过创建一个随机名称的新部分进行了测试。
<applicationSettingsConax>
令我惊讶的是,它能够加密它!所以我想,也许是
现在我真的很困惑。为什么 ASPNET_RegIIS.exe 不能加密 web.config 中的许多部分,但可以加密随机创建名称的部分?
(是的,我用谷歌搜索并没有找到任何信息。我已经阅读了官方的 MS 页面https://docs.microsoft.com/en-us/previous-versions/aspnet/zhhddkxy(v=vs.100),它也没有说太多。这不足为奇。)
【问题讨论】:
标签: encryption web-config