有没有一种方法来存储连接字符串在一个中心位置比machine.config中其它 [英] Is there a way to store connection strings in a central location other than machine.config

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

问题描述

目前我正在试图缓解了存在于我们的客户 - 服务器的配置地狱。我们有像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

这篇关于有没有一种方法来存储连接字符串在一个中心位置比machine.config中其它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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