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


    <authentication mode="Forms" />

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


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