Can any one please tell me the basic differences between App.config and Web.config.....
like can we have more than one app.config in a windows application......?
Can any one please tell me the basic differences between App.config and Web.config.....
like can we have more than one app.config in a windows application......?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Srinivas chowdaryPosted Nov 7, 2008, 3:49 AM
Thanks a lot for that..........
Niradhip ChakrabortyPosted Nov 7, 2008, 2:31 AM
web.config is used with web applications. web.config will by default have several configurations required for the web application. You can have a web.config for each folder under your web application.
app.config is used for windows applications. When you build the application in vs.net, it will be automatically renamed to.exe.config and this file has to be delivered along with your application.
You can use the same method to call the appsettings values from both config files :
System.Configuration.COnfigurationSettings.AppSettings["Key"].
By default, you can have only one configuration file for a windows application. If you need to read from more than one config file, you have to do some additional coding.