Home  >  Article  >  Backend Development  >  Detailed introduction to the hierarchical relationship of Web.config files in ASP.NET

Detailed introduction to the hierarchical relationship of Web.config files in ASP.NET

高洛峰
高洛峰Original
2016-12-24 13:06:381299browse

Web.config is an XML-based configuration file. The function of this file is to configure the application, such as stipulating customer authentication methods, role-based security technology policies, data binding methods, remote processing objects, etc.

You can create your own Web.config files in the root directory and subdirectories of the website, or you can not create a Web.config file at all. Web.config is not a necessary file for the website. This is because the server has a general configuration file named "Machine.config", which is installed in the directory "C:WindowsMicrosoft.NET Framework (version number) CONFIG" by default. This configuration file has determined the basic configuration of all ASP.NET applications. Under normal circumstances, do not modify this file to avoid affecting the normal operation of other applications.

There is a hierarchical relationship between the Machine.config and Web.config files, as well as between the Web.config files in each directory. The Web.config in the root directory inherits the configuration of Machine.config, and the subdirectories inherit the configuration of the parent directory Web.config. Only when there is a new configuration in Web.config of a subdirectory, the configuration with the same name in the parent directory will be automatically overwritten.


For more detailed introduction to the hierarchical relationship of Web.config files in ASP.NET and related articles, please pay attention to the PHP Chinese website!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn