| |||||||||||
<location> SectionASP.NET Syntax ASP.NET Configuration Sections .NET Framework version 2.0 Specifies the resource that child configuration settings apply to and locks configuration settings, preventing the settings from being overridden by child configuration files. <location allowOverride = "true | false" path = "path" /> Attributes and ElementsThe following sections describe attributes, child elements, and parent elements for this element. Attributes
Child ElementsThe location element can enclose other elements, either to apply configuration settings to a specific resource or to lock the configuration settings. Parent Elements
RemarksThe location element specifies the resource that child configuration settings apply to and is also used to lock configuration settings, preventing the settings from being overridden by child configuration files. The location element can enclose other elements, either to apply configuration settings to a specific resource or to lock the settings. For more information, see Locking Configuration Settings. ExampleThe following code example demonstrates how to allow an anonymous user to gain access to the Logon.aspx page. <configuration>
<location path = "Logon.aspx">
<system.web>
<authorization>
<allow users = "?" />
</authorization>
</system.web>
</location>
</configuration>
The following code example demonstrates how to set the uploaded file size limit to 128 KB for only the page specified. <configuration>
<location path = "UploadPage.aspx">
<httpRuntime maxRequestLength = "128" />
</location>
</configuration>
The following code example demonstrates how to prevent configuration settings from being changed by Web.config files that are in child directories. <configuration> <location allowOverride = "false" /> </configuration> See AlsoASP.NET Configuration Configuration <location> Settings Locking Configuration Settings |
| ||||||||||
Check out related books at Amazon
© 2000-2008 Rey Nuñez All rights reserved.
If you have any question, comment or suggestion
about this site, please send us a note
You can help support aspxtreme