11.07.2015 Views

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

Improving Web Application Security: Threats and - CGISecurity

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 19: Securing Your ASP.NET <strong>Application</strong> <strong>and</strong> <strong>Web</strong> Services 551If the same configuration element is used in Machine.config <strong>and</strong> in one or more<strong>Web</strong>.config files, the setting from the file lowest in the hierarchy overrides the higherlevelsettings. New configuration settings that are not applied at the machine levelcan also be applied to <strong>Web</strong>.config files <strong>and</strong> certain elements can clear the parent-levelsettings using the element.The following table shows where the combined configuration settings are obtainedfrom for a combination of <strong>Web</strong> requests that apply to Figure 19.2.Table 19.2 Applying Configuration SettingsHTTP Requesthttp://Server/AppRootCombined Settings Obtained FromMachine.config<strong>Web</strong>.config (AppRoot v-dir)http://Server/AppRoot/SubDir1Machine.config<strong>Web</strong>.config (AppRoot v-dir)<strong>Web</strong>.config (SubDir1)http://Server/AppRoot/SubDir2Machine.config<strong>Web</strong>.config (AppRoot v-dir)http://Server/Subdir2Machine.configThe element is used for three main purposes:●●●To apply configuration settings to specific application files.To centralize administration by applying application-specific settings inMachine.config.To lock configuration settings to prevent override at the application level.The tag can be used in Machine.config or <strong>Web</strong>.config. WithMachine.config, if you specify the path, then it must be fully qualified <strong>and</strong> includethe <strong>Web</strong> site name, virtual directory name, <strong>and</strong> optionally, a subdirectory <strong>and</strong> filename. For example:. . .Note You must include the <strong>Web</strong> site name when using the location tag from Machine.config.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!