全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 518|回复: 3
打印 上一主题 下一主题

.net 源码 web.config 文件 数据库字符串问题

[复制链接]
跳转到指定楼层
1#
发表于 2015-11-17 10:58:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
<connectionStrings>
<add name="Connection String" connectionString="Ik2dvqnHG8LIP/gG8QHQZ4Mduk4/5Ualu7BiUQR85+VZ0hE2PPVQETW/OCN4CLk8eHNjbaFys83Ge4vUDDExc6tXWy6FZwtPj/NEQu6DObKDH1Qft0xy1VqbBTlbxypNMAj85sMnK1zBoIU/srRYGmoSi/jzwRmYaDisNv01PgENopcQHux/Q3Zq2NKkn+/PG/xQNuTFDTPmrn5qqaI4qpxSTIYk+LmA" providerName="System.Data.SqlClient"/>
</connectionStrings>

这是加密了的意思还是?如何转换明文呢
2#
发表于 2015-11-17 11:10:09 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
3#
发表于 2015-11-17 11:21:55 | 只看该作者
不是明文 加密了 connectionString属性一般都是设置为 连接至数据库的完整的 连接字符串
一般使用两种保护配置信息的Providers
RSAProtectedConfigurationProvider :
第一种 默认的Provider,可以使用这个RAS密匙和加密法则来加密和解密数据
DataRrotectionConfigurationProvider :
第二种 这个Provider 使用Windows提供的数据保护应用程序接口(DPAPI)来加密解密数据
还是应该属于静态的加密方法的
解密
public static void DecrptConnction()
     {
         Configuration config = WebConfigurationManager.OpenWebConfiguration(HttpContext.Current.Request.ApplicationPath);
         ConfigurationSection section = config.GetSection("connectionStrings");
        if (section.SectionInformation.IsProtected)                 
         {
             section.SectionInformation.UnprotectSection();
             config.Save();
         }
     }
4#
发表于 2015-11-17 12:39:26 | 只看该作者
你不知道他的加密方式,所以也不好解密了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-15 12:33 , Processed in 0.060140 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表