tags:

views:

10

answers:

1

When i tried to implement form authentication in various subfolders i am getting an error as follows: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.

implementation in my webconfig was as follows

<location path="HelpDesk">
<system.web>
  <authentication mode="Forms">
    <forms loginUrl="Helpdesk/Default.aspx" />
  </authentication>
  </system.web>
</location>
A: 

You have forget/copy a web.config inside a subdirectory on your project that contains commands that is only for the main web.config.

If this is not your main config, then you need to change it for sub folder users... for example something like:

<configuration>
    <system.web>
      <authorization>
        <allow roles="whatever" />
        <deny users="*" />
      </authorization>
    </system.web>
</configuration>
Aristos