在实体框架加密的ConnectionString(第一码) [英] Encrypt ConnectionString in entity framework (first code)

查看:95
本文介绍了在实体框架加密的ConnectionString(第一码)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎么能保护我的连接字符串?我想使用C#实体框架4.1(第一个代码),但它是对我很重要,其他人无法看到我的连接字符串。

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.

推荐答案

有是使用EF或任何其他的ORM没有什么区别,你可以使用加密的ConnectionString,并呼吁EF上下文的初始化将自动地发生之前解密它的标准方式。

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

这篇关于在实体框架加密的ConnectionString(第一码)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆