码迷,mamicode.com
首页 > 其他好文 > 详细

给config加密

时间:2014-07-29 13:40:58      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   for   cti   div   app   

Configuration config = WebConfigurationManager.OpenWebConfiguration("/");
            ConfigurationSection appSettings = config.GetSection("appSettings");
            if (appSettings.SectionInformation.IsProtected)
            {
                appSettings.SectionInformation.UnprotectSection();
            }
            else
            {
                appSettings.SectionInformation.ProtectSection(
                "DataProtectionConfigurationProvider");
            }
            config.Save();

 

给config加密,布布扣,bubuko.com

给config加密

标签:style   blog   color   io   for   cti   div   app   

原文地址:http://www.cnblogs.com/honghong75042/p/3875012.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!