Error occurred in forms authentication in asp.net
<p>I wanted to create a form which anonymous user can't access without having a password. I tried this piece of configuration in my web.config file.</p>
<pre><code>&lt;authentication mode=&quot;Forms&quot;&gt;
  &lt;forms loginUrl=&quot;Login.aspx&quot;&gt;
    &lt;credentials passwordFormat=&quot;Clear&quot;&gt;
      &lt;user name=&quot;xxx&quot; password=&quot;xxx&quot;/&gt;
    &lt;/credentials&gt;
  &lt;/forms&gt;        
&lt;/authentication&gt;
</code></pre>
<p>After i deployed the application i get error like this in my web browser</p>
<blockquote>
<p>Configuration Error</p>
<p>Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.</p>
<p>Parser Error Message: 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.</p>
<p>Source Error:</p>
</blockquote>
<p>Can anybody tell me what is happening and how to solve this problem?</p>