有没有一种方法来存储连接字符串在一个中心位置比machine.config中其它在一、字符串、方法来、位置

由网友(陌然淺笑)分享简介:目前我正在试图缓解了存在于我们的客户 - 服务器的配置地狱。我们有像8的应用程序谁都有自己的连接字符串信息,我们都希望存储连接字符串在一个中心位置,使我们可怜的支持团队的生活更轻松。不过,我一直在问,以避免在machine.config中这样做,因为(1)我们经常没有在客户的网站,显然服务器(这种担心应该并不重要,只要...

目前我正在试图缓解了存在于我们的客户 - 服务器的配置地狱。我们有像8的应用程序谁都有自己的连接字符串信息,我们都希望存储连接字符串在一个中心位置,使我们可怜的支持团队的生活更轻松。不过,我一直在问,以避免在machine.config中这样做,因为(1)我们经常没有在客户的网站,显然服务器(这种担心应该并不重要,只要我们命名事物合理唯一的第三方,但这不同的战斗,我得打)(2)还有谁不希望我们去触摸的machine.config(什么我假设是无效的原因,一对夫妇的客户,但我不得到报酬担心这样的事情)。

I am currently trying to ease the configuration hell that exists on our client-servers. We have something like 8 applications who each have their own connection string info, and we were hoping to store connection strings in a central location to make our poor support team's life easier. However, I have been asked to avoid doing this in machine.config because (1) we are frequently not the only third party on servers at client sites and apparently (this concern shouldn't matter as long as we name things reasonably, but that's a different fight I've got to fight) (2) there are a couple of clients who don't want us to touch machine.config (for what I assume are invalid reasons, but I don't get paid to worry about such things).

不幸的是,连接通过的configSource属性外部文件不起作用,除非外部文件驻留在或应用程序配置文件所在的目录下。

Unfortunately, linking to an external file via the configSource attribute of doesn't work unless the external file resides in or below the directory the application configuration file resides in.

有没有办法做到这一点,这将不涉及我做这样的事情复制连接字符串信息到配置文件,在应用程序启动?

Is there any way to do this that won't involve me doing something like copying connection string information into configuration files at application startup?

推荐答案

您可以将其存储在Active Directory,然后用一个查询检索。或者你可以试试这个:http://www.$c$cproject.com/Articles/66569/How-to-store-shared-app-settings-and-connection-st

You can store it in an active directory and then retrieve it with a query. Or you can try this : http://www.codeproject.com/Articles/66569/How-to-store-shared-app-settings-and-connection-st

阅读全文

相关推荐

最新文章