Authorizing Files by Location : Authorization « Authentication Authorization « ASP.NET Tutorial






The location element can apply a set of authorization rules to a folder or page at a particular path.

File: Web.Config

<configuration>

  <system.web>
    <authentication mode="Forms" />
  </system.web>

  <location path="Secret.aspx">
    <system.web>
      <authorization>
        <deny users="?"/>
      </authorization>
    </system.web>
  </location>

</configuration>








21.2.Authorization
21.2.1.Configuring Authorization
21.2.2.Assign a particular username, or comma-delimited list of usernames, to the deny element
21.2.3.Authorizing by Role
21.2.4.Authorizing Files by Location
21.2.5.Use the location element to apply configuration settings to a particular subfolder