Our
sites are configured based on hierarchy of XML configuration files.
Machine.config is top level configuration file located in Config:
%WINDIR%\Microsoft.NET\Framework\<version>\Config\machine.config
These
settings are framework level and common to all Windows, Console, Class Library,
and Web application. Some of them could be overridden in Web.config while
others are protected.
Next
in hierarchy is Root.config. It’s located in Config:
%WINDIR%\Microsoft.NET\Framework\<version>\Config\web.config
It
contains default web server settings.
Optionally one can
add at root of all websites a web.config to provide general settings related to
all sites. Optionally to provide more control on settings one can add
web.config in each web site and for each folder in that web site.
Processing
the Configuration files:
Configuration
files are processed in Global to specific order.
Machine.Config => (Config)
web.config (Root) web.config (App) Web.config => (SubDir) Web.Config
Settings
are overridden (non-protected) and than applied to specific folder.
Modifying
the configuration Files:
Configuration
files can be modified in any text editor. .Net Framework 2.0 Configuration
snap-in with Microsoft Management Console can be used. VS 2005 and 2008
provides Web Site Administration tool to modify configuration files. à in VS 2005 go to Wbsite à ASP.NET Configuration.
Web
Site Administration tool provides control over the following settings:
- Security: You can add users, roles, and permissions for your web site.
- Application Configuration: Allows you to setup Application settings, SMTP, Debug and trace settings.
Comments