加密配置节
protected void Button1_Click(object sender, EventArgs e) { Configuration config = WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath); ConfigurationSection appSettings = config.GetSection("connectionStrings"); if (appSettings.SectionInformation.IsProtected) { appSettings.SectionInformation.UnprotectSection(); lblInfo.Text = "配置节已解密!"; } else { appSettings.SectionInformation.ProtectSection( "DataProtectionConfigurationProvider"); Button1.Text = "解密"; lblInfo.Text = "已加密配置节!"; } config.Save(); }
最后更新:2017-04-02 04:01:42
上一篇:
semget, semop and semctl函数小记
下一篇:
2010年最新令人无语语录
会计札记
最新阿里云优惠券2017在哪里领取,如何使用?
《配置管理最佳实践》——第2章 构建工程 2.1为什么构建工程如此重要
2016金融科创公司哪家强?福布斯公布Fintech50强榜单
长安汽车发布“香格里拉计划”:2025年全面停售燃油车,布局新能源L3-L4级自动驾驶
分类算法-贝叶斯网络(Bayesian networks)
HDU4716-A Computer Graphics Problem
linux 空间不够了,怎么办?Disk Requirements:At least 11MB more space needed on the / filesystem.
MongoDB请求处理流程
2013蓝桥杯【模拟赛】硬币方案