views:

43

answers:

1

Hi all,

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 several configurations from my web.config file. How can this be done?

Thank you

+3  A: 

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.

RPM1984