title: Deny access to 'admin' folder in web.config
body: <p>I am new to ASP.NET, so forgive me if this is simple.</p>
  
  <p>I am trying to deny access to my 'Admin' folder via web.config.  I looked at another answer to a similar question and they recommend using the <code>&lt;location&gt;</code> folder, however when I insert "Admin/" into the path I get the following error:</p>
  
  <blockquote>
    <p> path attribute must be a
    relative virtual path.  It cannot
    start with any of ' ' '.' '/' or
    '\'.  C:\Personal\Projects\OliverSalon\web.config</p>
  </blockquote>
  
  <p>I have tried placing "Admin", "/Admin" &amp; "Admin/"</p>
  
  <pre><code>&lt;configuration&gt;
  
  &lt;connectionStrings&gt;
      &lt;add name="OliverSalonConnectionString1" connectionString="Data Source=localhost;Initial Catalog=OliverSalon;Integrated Security=True" providerName="System.Data.SqlClient" /&gt;
  &lt;/connectionStrings&gt;
  &lt;system.web&gt;
      &lt;compilation debug="false" targetFramework="4.0" /&gt;
      &lt;authentication mode="Forms"&gt;
          &lt;forms name="Oliver" loginUrl="Login.aspx" path="/" timeout="20"&gt;
              &lt;credentials passwordFormat="Clear"&gt;
                  &lt;user name="OliverSalon" password="cuts"/&gt;
              &lt;/credentials&gt;
          &lt;/forms&gt;
      &lt;/authentication&gt;
      &lt;authorization &gt;
          &lt;deny users="?"/&gt;
      &lt;/authorization&gt;
  &lt;/system.web&gt;
  &lt;location path="/Admin"&gt;
      &lt;system.webServer&gt;
          &lt;directoryBrowse enabled="false"/&gt;
      &lt;/system.webServer&gt;
  &lt;/location&gt;
  </code></pre>
  
  <p></p>