0

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?

Community
  • 1
  • 1
progmo
  • 11
  • 4
  • Did you configure the folder that the site is hosted in as an application within IIS? – mason Apr 05 '16 at 16:44
  • yes i did. is that the problem? – progmo Apr 05 '16 at 16:46
  • @progmo No, that's not the problem. IIS is interpreting the opposite and giving this error. Is there multiple web.config files present in the directory structure? Have you checked event viewer and IIS Logs for troubleshooting? What's the windows and IIS version? – Techie Apr 05 '16 at 17:14
  • @Nimesh can you please tell me how checked event viewer and IIS logs. I don't know how to checked them ? – progmo Apr 05 '16 at 17:20
  • DId you check the responses from [this thread](http://stackoverflow.com/questions/2355947/error-allowdefinition-machinetoapplication-beyond-application-level?rq=1)? – Techie Apr 05 '16 at 17:28

0 Answers0