Hi All,
I would like to know when to use web.config and when to use machine.config?
I need the answer at the earliest.

Thanks and with regards,

"web.config" is scoped to a particular directory. You use it to override machine.config for a particular application or application sub-folder. Sorry for not answering sooner; there is an ASP.NET sub-forum that you might want to use for these types of questions in the future.

web.config is configure ur apllication only
but machine.config file related to ur all d application on ur server.
the settings made in the web.config file are applied to that particular web application only whereas the settings of machine.config file are applied to the whole asp.net application.
The MACHINE.config file contains default and machnine-specific values for all supported setting.
Machine setting are normally controlled by the system admin and app should never be given write access to it.
An application can override most default values stored in the machine.config file by creating one or more web.config files.

At min an app creates a WEB config file in its root folder. The web.config file is a subset of machine.config written according to the same XML achema.

The machine.config file will automatically installed when you install Visual Studio.Net and it exist exists in the c:\windows\microsoft.net\framework\version\config folder whereas web.config will automatically created when you create an ASP.Net web application project.

Each .NET Framework version has only one machine.config file , at the same time, each web application has its own web.config file. Directories inside a web application can also have web.config files too.

more detail..



This article has been dead for over six months. Start a new discussion instead.