Configuration File Dotnet

What is Web.Config File?

   It is an optional XML File which stores configuration details for a specific web application.

What is Machine.config File?

The Machine.Config file, which specifies the settings that are global to a particular machine. This file is located at the following path:

\WINNT\Microsoft.NET\Framework\[Framework Version]\CONFIG\machine.config

As web.config file is used to configure one asp .net web application, same way Machine.config file is used to configure the application according to a particular machine. That is, configuration done in machine.config file is affected on any application that runs on a particular machine. Usually, this file is not altered and only web.config is used which configuring applications.

You can override settings in the Machine.Config file for all the applications in a particular Web site by placing a Web.Config file in the root directory of the Web site as follows:


Macine Config VS WebConfiguration

Difference between Machine.Config and Web.Config


i) This is automatically installed when you install Visual Studio. Net.
ii) This is also called machine level configuration file.
iii)Only one machine.config file exists on a server.
iv) This file is at the highest level in the configuration hierarchy.


i) This is automatically created when you create an ASP.Net web application project.

ii) This is also called application level configuration file.

iii)This file inherits setting from the machine.config


Featured Post

MSDEVBUILD in Feedspot Top 100 Microsoft Azure Blogs

I am pleased to announce my blog again has been listed on the popular Feedspot website as one of the Top 100 Microsoft Azure...

Popular Posts