Programming Microsoft ASP.NET 4 - Dino Esposito [36]
Value
Description
Everywhere
The section can be used in any configuration file. (Default.)
MachineOnly
The section can be used only in the machine.config file.
MachineToApplication
The section can be used in the machine.config file and in the application’s web.config file. You cannot use the section in web.config files located in subdirectories of the virtual folder.
The allowLocation attribute determines whether the section can be used within the Many sections in the configuration files support three special elements, named The Note Sections are a necessary syntax element in configuration files. However, you don’t need to declare sections in all application-specific web.config files. When processing a web.config file, in fact, ASP.NET builds a configuration tree starting from the root machine.config file. Because all standard sections are already declared in the machine.config file that ships with the .NET Framework, your application needs to declare only custom sections you plan to use. Finally, bear in mind that an exception is thrown if a configuration section lacks a corresponding entry in the Let’s start our tour of the configuration schema with a closer look at the The When defined inside an application’s root web.config file, it allows you to apply different settings to different subdirectories. Instead of defining child web.config files, you can create a single web.config file in the root folder and specify settings on a per-directory basis. Basically, the When defined inside the machine.config file, or in a site’s root web.config file, the Important Note the difference between the application’s root web.config file and the site’s root web.config file. The application’s root configuration file is the web.config file you find in the application’s root folder. You use this file to adapt ASP.NET settings to the needs of the particular application and its subdirectories. In contrast, the site’s root web.config file is located in the same folder as machine.config, and therefore is well outside the Web space of any deployed applications.
The