- Web.config
Web.config is the main settings and configuration file for an
ASP.NET web application. The file is anXML document that defines configuration information regarding the web application.The web.config file contains information that control module loading, security configuration, session state configuration, and application language and compilation settings. Web.config files can also contain application specific items such as databaseconnection string s.Web.Config InheritanceThe initial web.config file for an application must be placed in the root directory of the web application. Sub-directories within the web application can contain their own web.config files to control individual configuration settings appropriate to the given sub-directory. ASP.Net uses a hierarchal configuration scheme that allows inheritance of configuration settings to minimize the actual web.config entries at a sub-directory.
Each web application in ASP.Net inherits their base web.config from the machine's web.config located in %SystemRoot%Microsoft.NetFrameworkv#.#.#.#CONFIG, although individual sections can be assigned in the main web.config using the
directive and/or locked using the allowOverride element. [Locking Configuration Settings [http://msdn2.microsoft.com/en-us/library/55th21y4(VS.71).aspx] ] Use in IIS 6 and IIS 7
In IIS 6, the directory that is the root of the web application needs to be configured as an Application via the the Home Directory or Virtual Directory property tab in IIS Manager for the site.
IIS 7 does not have this requirement, making configuration of web applications significantly easier.
External links
;ASP.NET Resources
* [http://msdn2.microsoft.com/en-us/library/aa719558.aspx ASP.NET Configuration]
* [http://msdn2.microsoft.com/en-us/library/ackhksh7(VS.71).aspx Format of ASP.NET Configuration Files]References
Wikimedia Foundation. 2010.