Encrypt ConnectionString in entity framework (first code)

后端 未结 3 1761
有刺的猬
有刺的猬 2020-12-16 22:20

How can i protect my connection string? I want to use Entity framework 4.1 (first code) in C#, but it is important to me that other people can not see my Connection String.<

3条回答
  •  一生所求
    2020-12-16 22:48

    There is no difference between using EF or any other ORM, you can use the standard way of encrypting connectionstring and decrypting it before calling the initialization of EF Context will happen automagically.

    • Encrypting and Decrypting Configuration Sections
    • Programmatically Encrypt and Decrypt Configuration Sections in web.config using ASP.NET
    • How To: Encrypt Configuration Sections in ASP.NET 2.0 Using DPAPI
    • How To: Encrypt Configuration Sections in ASP.NET 2.0 Using RSA

提交回复
热议问题