给config加密

Configuration config = WebConfigurationManager.OpenWebConfiguration("/");
ConfigurationSection appSettings = config.GetSection("appSettings");
if (appSettings.SectionInformation.IsProtected)
{
appSettings.SectionInformation.UnprotectSection();
}
else
{
appSettings.SectionInformation.ProtectSection(
"DataProtectionConfigurationProvider");
}
config.Save();
上一篇:java旋转图片


下一篇:如何定制 Calico 的 IP 池?- 每天5分钟玩转 Docker 容器技术(71)