asp.net配置文件connectionStrings加密和解密
2016-09-09 09:52
399 查看
1.为了使相关配置文件更加安全,有时需要对其进行加密操作,下面是一组对appSections加密的操作
操作完成后;可在web.config文件中观察connectionStrings变化
Configuration config = WebConfigurationManager.OpenWebConfigruation("/"); ConfiguratoinSection appSec = config.GetSection("connectionStrings"); if(appSec.SectionInformation.IsProtected) { appSec.SectionInformation.UnprotectSection(); } else { appSec.SectionInformation.ProtectSection("DataProtectionConfigurationProvider"); } config.save();
操作完成后;可在web.config文件中观察connectionStrings变化
相关文章推荐
- ASP.NET 2.0加密解密Web.config配置文件
- ASP.NET 2.0加密Web.config 配置文件
- asp.net 2.0 中加密web.config 文件中的配置节
- ASP.NET 2.0 中一种新的方法实现对配置文件的加密
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config 配置文件 (终极版)
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config配置文件
- asp.net 2.0 中加密web.config 文件中的配置节
- asp.net 2.0 中加密web.config 文件中的配置节
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密网站配置文件中的信息
- ASP.NET 2.0中,对网站配置文件(web.cofig)进行加密(摘)
- Asp.Net 2.0加密Web.config配置文件
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config 配置文件
- ASP.NET 2.0加密Web.config 配置文件
- asp.net 2.0 中加密web.config 文件中的配置节