在machine.config中存储连接字符串VS它们存储在web.config中 [英] Storing connection strings in machine.config vs storing them in web.config

查看:122
本文介绍了在machine.config中存储连接字符串VS它们存储在web.config中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有关专用服务器,是它更好地存储在web.config中或machine.config中的连接字符串?什么是每一种方法的优点和缺点?

For a dedicated server, is it better to store the connection string in web.config or machine.config? what's the advantages and disadvantages of each approach?

感谢

编辑:我很担心安全问题在这里,所以,问题是关于哪种方法更安全。

I'm concerned about security here, so, the question is about which approach is more secure.

推荐答案

我总是会用,理由web.config中走那就是,每个人都希望它是。有一个在给有通过存储在一个不寻常的地方连接字符串来维持网站的任何更多的困难的人是没有意义的。

I would always go with web.config on the grounds that that is where everyone would expect it to be. There is no point in giving the person that has to maintain the web site any more difficulty by storing connection strings in an unusual place.

其他

我仍然不会存储在machine.config连接字符串。如果你这样做在机器上运行的任何.NET应用程序可以访问你的连接字符串。

I still wouldn't store connection strings in the machine.config. If you do that any .NET application running on the machine has access to your connection strings.

web.config中是受保护的文件。除非你做一些错误配置IIS它不会成为它在默认情况下。

web.config is a protected file. IIS won't serve it up by default unless you do something to misconfigure it.

这篇关于在machine.config中存储连接字符串VS它们存储在web.config中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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