Windows 服务和 WCF Web 服务的 .NET 集中配置
有谁知道一种集中 .NET 应用程序配置的方法,以便计算机上的多个 Windows 服务和多个 WCF Web 服务可以使用它?它们都安装在 \program files 下的单独文件夹中。我们的软件目前为每个应用程序都有一个单独的应用程序配置,但试图维护这一切变得越来越疯狂。
我们虽然让每个应用程序引用一个可以从中央文件读取的 gac dll,但由于调用 wcf Web 服务的那些应用程序的 wcf 客户端配置,这可能无法正常工作。
例如,我们通常在一台计算机上有 2 个或更多 wcf web 服务和/或 2 个或更多 Windows 服务,并且它们每个都有自己的配置文件。
蒂亚
Does anybody know of a way to centralize a .NET app config so that it can be used by multiple windows services and multiple wcf web services on a computer? They are all installed in separate folders under \program files. Our software currently has a separate app config for each application but it's getting crazy trying to maintain it all.
We have though of having each application reference a gac dll that can read from a central file but that will probably not work due to the wcf client configuration for those apps that call wcf web services.
For example we will typically have 2 or more wcf webservices and/or 2 or more windows services on a computer and they each have their own configuration files.
tia
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
.NET 配置文件可以引用另一个配置文件。如果您的应用程序的部署与此类似:
您可以从
ClientA.config
引用Shared.config
:您还可以尝试将设置放入 machine.config。来自使用配置文件配置服务:
.NET configuration file can reference another config file. If your apps are deployed similar to this:
You can reference
Shared.config
fromClientA.config
:You can also try putting settings into machine.config. From Configuring Services Using Configuration Files: