在web.config中写入连接字符串是否安全? [英] Is it safe to write connection string in web.config?
问题描述
在ASP.net应用程序的web.config中写入连接字符串是否安全?该应用程序将使用2个数据库,我认为可以很容易地检索连接字符串.任何人都可以建议一个安全的地方(web.config或其他文件)来写连接字符串,但不加密它.
Is it safe to write connection string in web.config in an ASP.net application. The application will be using 2 databases and I think the connection string can be retrieved easily. Can anyone please suggest a secure place(web.config or other file) for writting the connection string except encrypting it.
推荐答案
Web.config
是正确的选择.如果您担心,可以加密连接字符串.加密Web.config中的连接字符串,ASP.NET已经支持它,看来您已经知道...
Web.config
is the right place for this. You can encrypt the connection string if that's a concern for you. Encrypting the connection string in Web.config it's already supported in ASP.NET and it seems that you already know that...
这篇关于在web.config中写入连接字符串是否安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!