asp.net2.0如何加密数据库联接字符串
asp.net2.0如何加密数据库联接字符串在asp.net2.0中,发布网站时,加密web.config,这样可以有效保证数据库用户和密码安全,其步骤如下:
1.添加密钥
执行:c:\windows\microsoft.net\framework\v2.0.50727\aspnet_regiis -pc "hnlaw" -exp
其中"hnlaw"为密钥名称
2.添加web.config节点
在web.config的<configuration></configuration>之间添加: