app.config 中的 <configSections><section> 中引用的 <location> 元素是什么

What is this <location> element referred to in <configSections><section> in app.config

我正在创建一个ConfigurationSection. In the example given the attribute allowLocation of the <section> attribute is set to true. Looking at what this allowLocation means,我仍然很困惑。该页面上写着 Determines whether the section can be used within the <location> element.。我找不到此 <location> 元素的文档。

这个 <location> 元素有什么作用?这有什么用途?

给你!

Specifies the resource that child configuration settings apply to and locks 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 configuration settings.

示例:

<configuration>
 <location path="Logon.aspx">
  <system.web>
     <authorization>
        <allow users="?"/>
     </authorization>
  </system.web>
 </location>
</configuration>

Source @ msdn