Difference between Web.Config and Machine.Config File


Machine.Config:-
1) This is automatically installed when you install Visual Studio. Net.
2) This is also called machine level configuration file.
3)Only one machine.config file exists on a server.
4) This file is at the highest level in the configuration hierarchy.
Web.Config:-
1) This is automatically created when you create an ASP.Net web application project.
2) This is also called application level configuration file.
3)This file inherits setting from the machine.config
.........................................................................................................................................
1)Machine.config is used to store machine level settings
Web.config is used to store per application based settings
2)We can have more than one web.config files but only one
machine.config
3)Web.config overrides the machine.config file.
If we store different values on both for a single key, the
application will get the value from the web.config file
.........................................................................................................................................
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.

.........................................................................................................................................
Machine.Config:-
1) This is automatically installed when you install .Net Framework.
2)Only one machine.config file can exist on a server.
3) This file is at the highest level in the configuration hierarchy.
4)Its like a common repository for standard items and its over ridden by web.config file.
3)With out the Machine.Config file Application can not be executed.
Web.Config:-
1) This is automatically created when you create an ASP.Net web application project.
2)This file inherits the settings from the machine.config
3)With out the Web.Config file Application can still be executed.

 

0 comments:

Post a Comment