Saturday 10 August 2013

What is the difference between app.config, web.config and machine.config ?

In this .NET Interview questions interviewer expects two things. First the importance of configuration and second in which scenarios are the above file applicable. So lets answer the question in two parts.
The importance of config files==================================================
App.config, web.config and machine.config are files which store configuration data in XML
format. We need configuration data at application level or at machine/server level.
Scenarios in which the above config files are used===================================================
Machine.config file stores configuration information at system level. It can contain configuration information like timeout in ASP.NET application, requestLimit, memoryLimit, and ClientConnectedCheck etc.
Generally we have two kinds of application web application and windows application. Web.config file stores configuration data for web applications and app.config file store configuration information for windows application.
Application level configuration data can be like connection strings,security etc.

No comments:

Post a Comment