开发者

Is there a way to load multiple app.configs in memory?

I have a windows service that loads multiple "handlers" written by different developers. The windows service exe has it's own app.config which I need.

I'm trying to make it so that each developer can provide their own app.config along with their handler code. However, it seems an exe can only have one app.config. However, ASP.NET seems to support开发者_如何学运维 nested web.config... That's not exactly what I want, but I don't even know how I would get that to work in a windows service.

Anyone come across this before or have any ideas?


I've not tried it, but I think you may be able to use the Configuration Manager to create separate Configuration objects for each of the handlers. Specifically, this page details a method for loading Configurations from "custom" filenames.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜