开发者

ConfigurationManager.Appsettings[""] Sharing config file

开发者 https://www.devze.com 2023-03-13 15:44 出处:网络
Currently, I have 2 windows services that i would like them to be sh开发者_C百科aring from a single app.config file.

Currently, I have 2 windows services that i would like them to be sh开发者_C百科aring from a single app.config file.

How i can tell ConfigurationManager class to load settings from a single file that would be shared by 2 services?

With ConfigurationManager.Appsettings[""] requires, each service needs to have its own config file. It would be nice if the user can just configure one file instead of 2 files with similar settings.

Cheers


<appSettings configSource="appSettings.shared.config"/>

http://sunali.com/2008/01/23/configsource-property-dividing-configuration-files-into-pieces/

0

精彩评论

暂无评论...
验证码 换一张
取 消