加密配置節
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藍橋杯【模擬賽】硬幣方案