开发者

share configuration between console application and asp.net web application

开发者 https://www.devze.com 2023-01-09 09:00 出处:网络
I have a web.config file defined in my asp.net web application. I have many different settings configured there.

I have a web.config file defined in my asp.net web application. I have many different settings configured there.

I have another project, this time a console application. I'd like to read seve开发者_开发知识库ral configurations from my web.config file. How can this be done?

Thank you


Check out this article.

Does exactly what you want.

Basically you "delegate" sections of your config file to another file.

In your case you would delegate sections of your config file in your console app, to read the settings from the web.config in your web app.

0

精彩评论

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

关注公众号