Asp. A detailed introduction to the hierarchical relationship of web.config files in net

Source: Internet
Author: User
Tags config parent directory root directory

Web.config is an xml-based configuration file that is configured to configure the application, and the following describes the hierarchical relationship of web.config files in asp.net

Web.config is an xml-based configuration file that is used to configure the application, such as a customer authentication method, role-based security technology strategy, data binding

Fixed methods, remoting objects, and so on.

Can be in the root directory and subdirectories of the site to establish their own Web.config files, can also be a Web.config files are not established, Web.config is not a prerequisite for the site files. This is because the server has a general configuration file named "Machine.config", which is installed by default in the directory of the C:windowsmicrosoft.net Framework (version number) config. This profile has been identified with the basic configuration of all asp.net applications, and is not normally modified to affect the normal operation of other applications.

There is a hierarchical relationship between Machine.config and Web.config files, and Web.config files for each directory. The web.config of the root directory inherits the Machine.config configuration, and the subdirectory inherits the configuration of the parent directory web.config. A configuration with the same name as the parent directory is automatically overwritten only if there is a new configuration in the web.config of a subdirectory.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.