share configuration between console application and asp.net web application
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.
精彩评论