mobile ads

Wednesday 16 October 2013

machine.config and web.config

Machine.Config file specifies the settings that are global to a particular machine.  It is specifically used to store machine and application settings global to all asp.net web sites running in IIS in a computer. A system can have only one machine.config computer. Each .NET Framework such as 1.1, 2.0, 4.0 will have its own machine.config in the %runtime install path%\Config folder.
 This file is located at the following path:
 [Windows Directory]\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:
\InetPub\wwwroot\Web.Config
If you want to override a setting from machine.config for a particular asp.net web site, then you can re-write in web.config of that web site. An asp.net can have any number of web.config files.

0 comments:

Post a Comment