views:

56

answers:

1

Assume I have the following in my web.config (most of the file omitted for brevity):

<configuration>
  <location path="somefolder/somepage.aspx">
    <system.web>
      <authorization>
        <allow roles="SomeRole" />
        <deny users="*" />
      </authorization>
    </system.web>
  </location>
  <system.web>
    <authorization>
      <deny users="?"/>
    </authorization>
    <!-- 
            Lots of other settings.
        -->
  </system.web>
</configuration>

If I navigate to somefolder/somepage.aspx, whose access is limited to users in the SomeRole role (and I am a member of that role), what happens with the settings in the commented area? Do they still apply, even though they are outside the location element where the page is specified?

A: 

Yes, they still apply, provided that they aren't enclosed in <location> elements of their own.

RickNZ