
8.14.2002
Obscure <location> Element
This element is not documented in the overall ASP.NET Web.Config schema.It allows you to change the settings for a given subdirectory. (not sure about 2 levels down, like "data/foo" since "/" seems to be illegal in the path attribute).
Docs on this are here. Found in ".NET Framework SDK \ Configuring Applications \ ASP.NET Configuration \ Hierarchical Configuration Architecture \ Configuration <location> Settings.
<! Configuration for the "Sub1" subdirectory. -->
<location path="sub1">
<system.web>
<httpHandlers>
<add verb="*" path="Sub1.Scott" type="Sub1.Scott"/>
<add verb="*" path="Sub1.David" type="Sub1.David"/>
</httpHandlers>
</system.web>
</location>
Update: Ok, so this only works for aspx files (i.e. can't protect xml data files this way?)
(To protect sub directories 2 levels down, have to use forward slash in the web.config)
Comments:
Post a Comment