By default, Web. config is inherited. The web. config of the main application (root directory) of a site affects the virtual directories and sub-applications of the site by default.Program.
The method to disable Web. config is simple,In the Web. config file of the root directoryPut the content that you do not want to configure in the tag <Location Path = "." AllowOverride = "false" inheritinchildapplications = "false"> </location>. You can enclose one or more modules.
< Location Path = "." AllowOverride = "False" Inheritinchildapplications = "False" > < System. Web. webpages. Razor > ... </ System. Web. webpages. Razor > < System. Webserver > ... </ System. Webserver > < System. Web > ... </ System. Web > </ Location >
Several attributes of a tag are relatively simple. Does AllowOverride allow overwrite and the other inheritinchildapplications (vs edit web. config may prompt that this attribute does not exist, because it is supported in msdn) is a key attribute, which indicates whether the configuration content is integrated into the sub-application.