ADO.NET实体模型 Entityframework连接字符串加密解决方案

Use aspnet_regiis. In command line browse to (usually):

cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727

and type:

aspnet_regiis -pef "sectionName of web.config" "path" - to encrypt
aspnet_regiis -pdf "sectionName of web.config" "path" - to decrypt

For example:

aspnet_regiis -pef "connectionStrings" "D:\projects\HelloWorldProject"

You don't need to do anything to make L2SQL read ecrypted connection string file.


http://stackoverflow.com/questions/1335413/entity-framework-encrypt-connection-string?rq=1

原文地址


使用aspnet_regiis工具进行字符串加密

ADO.NET实体模型 Entityframework连接字符串加密解决方案_第1张图片

加密成功后asp.net程序会自动解密

此加密只限于不能直接查看数据库字符串,但是可以通过aspnet_regiis解密并没有太大的安全性可言

微软给的文档说明这个加密跟硬件有关相当于说这个加密只能用于运行加密的电脑使用,更换后需要重新加密

你可能感兴趣的:(.NET)