如何在多个服务器之间共享应用程序设置
我有 2 个网络服务器和 3 个具有多个应用程序的应用程序服务器。 我希望能够拥有某种系统,以便所有服务器的应用程序都可以访问通用的基本设置 - 数据库连接字符串、通用文件服务器共享、smtp 服务器等。
我能找到的唯一建议是将所有设置放入数据库中,但随后我需要将连接字符串放入每台服务器上的 machine.config 中。 我尝试将文件放在域控制器上并编写代码来计算控制器名称,但即使在模拟受信任的用户后我也无法读取该文件。
I have 2 webservers and 3 application servers with multiple applications.
I would like to be able to have some kind of a system such that applications from all servers could access common basic settings - db connection string, common file server share, smtp server, and such.
The only suggestion I could find was to place all settings in database, but then I would need to put the connection string in machine.config on each server.
I tried to put file on the domain controller and wrote code to figure controller name but I cannot read the file even after impersonating trusted user.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我们这样做的方式是通过中央应用程序服务器(我们称之为业务层)。
连接的应用程序只需配置中央服务器的地址,然后它们就可以从中检索所需的所有设置(通过远程处理、Web 服务、wcf 或您偏好的任何方式)。
更新
唯一想到的其他选项是使用 WS-Discovery 发送多播请求以查找提供信息的 WCF 服务。
这是一个链接到快速入门指南。
The way that we do this is through a central application server (we call it a business layer).
The connecting applications only have to be configured with the address of the central server and then they can retrieve all of the settings that they need from it (through remoting, web service, wcf, or whatever your preference is).
Update
The only other option that comes to mind is using WS-Discovery to send a multi-cast request to find a WCF service that provides the information.
Here is a link to a quick start guide.