From the above fig, the application root directory is the virtual directory of the web site. A virtual directory is the main directory of a web site. This virtual directory contains all the files , subdirectories and other resources of a web site. Every web site needs to have a virtual directory and the virtual directory might contain subdirectories within it. The two ditectories sub dir1 and sub dir2 that exist within application root directory are not virtual directories.
The default settings of the machine-level configuration file, that is , machine.config allow access to all users, and all ASP.net directories and subdirectories inherit settings from this machine.config file. However, if an application has a configuration file in its application root directory, it overrides the default settings of the machine.config file. Therefore, if a Web site has no configuration file in its application root directory, when the browser requests the Web site, all users will be given access to the ASP.net resources on the Web site.
In the above file structure, there is no configuration file in the application root directory. Therefore, the configuration settings for the machine.config file are applied to the entire file structure of the Web site.
However, if a Web.config file exists in a subdirectory of a Web site, the settings in the Web.config file of the sub directory override the settings of the machine.config file. For example, if there is a Web.config file in subdire2 with settings that specify access to certain users only, then all users will have access to the ASP.net resources in the application root directory but only certain users have access to the resources in sub directory Sub dir2.
Last edited by pbmods; Oct 22 '07, 11:52 AM.
Reason: Removed link.
Comment