Configuration Files in .Net

Let’s see first what you mean by configuration file. In simple words it means a file that contains configuration information for a particular program. When the program is executed, it checks the configuration file to see what parameters are in effect.
eg. The configuration file for DOS is called CONFIG.SYS. Older versions of the Windows operating system stores configuration information in files with a.INI extension. The two most important configuration files are WIN.INI and SYS.INI. Configuration files are XML files that contain the configuration settings.

There are three types of configuration files as described below

Machine configuration file:

The machine.config file contains settings that apply to the entire computer. This file is located in the %runtime install path%\Config directory. There is only one machine.config file on a computer.

Application Configuration file:

The name of this file depends on the application’s host. For ASP.Net applications, this file is called web.config and is located in the bin folder of the application root. An ASP.Net application can contain more than one web.config files at sub-directory level.In case on Win forms it is called App.config.

Security Configuration file :

These configuration files contain information about the code group hierarchy and permission sets for policy levels. There are three levels of security configuration files : Enterprise policy configuration file (Enterprisesec.config), Machine policy configuration file(Security.config) and User policy configuration file (Security.config). Note that you have to be extra careful while editing these files as changes might corrupt the security configurations. You will find above files in the following location :-

system directory: [Drive Letter]:\Windows\Microsoft.Net\Framework\[.NET version number]\config


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s