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.
<authentication mode="Forms">
<forms loginUrl="Login.aspx">
<credentials passwordFormat="Clear">
<user name="xxx" password="xxx"/>
</credentials>
</forms>
</authentication>
After i deployed the application i get error like this in my web browser
Configuration Error
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.
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.
Source Error:
Can anybody tell me what is happening and how to solve this problem?