title: Web Configuration file in a sub directory gives error
body: <p>I am using VS 2012 , I want to implement folder level user authentication and authorization, i have following folder/files structure.</p>
  
  <p><img src="https://i.stack.imgur.com/bia6x.jpg" alt="enter image description here"></p>
  
  <p>Following is <strong>Admin -> Web.congfig</strong> file.
  </p>
  
  <pre><code>  &lt;system.web&gt;
    &lt;authentication mode="Forms"&gt;
      &lt;forms loginUrl="~/login.aspx" timeout="30" defaultUrl="~/default.aspx" cookieless="AutoDetect"&gt;
        &lt;credentials passwordFormat="Clear"&gt;
          &lt;user name="Admin" password="abc"/&gt;
        &lt;/credentials&gt;
      &lt;/forms&gt;
    &lt;/authentication&gt;
  
  
  &lt;/system.web&gt;
   &lt;location path="~/Admin/Admin.aspx"&gt;&lt;/location&gt;
    &lt;system.web&gt;
      &lt;authorization&gt;
        &lt;deny users="*"/&gt;
          &lt;allow users="Admin"/&gt;
        &lt;/authorization&gt;
    &lt;/system.web&gt;
  
  &lt;/configuration&gt;
  </code></pre>
  
  <p>When i compile the application it gives me the following error message.</p>
  
  <p><strong>Error:    1   It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS.  E:\Kjan\Reports\Admin\Web.config    5</strong> </p>