Entity Framework Encrypt Connection String

I am using Entity Framework and Linq for Entities. I want to encrypt the connection string and EF should automatically decrypt, how can I do this?

Thanks in advance,

Javier P. de Jorge

+6
encryption entity-framework
source share
1 answer

Use aspnet_regiis. At the command prompt, find (usually):

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

and enter:

 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 do not need to do anything for L2SQL to read the file with the attached file extension.

+9
source share

All Articles