My web config, which is a config file in a folder (a config file additional to the main config file in the virtual directory):
> <?xml version="1.0"?>
<configuration>
<system.web>
<authentication mode="Forms">
<forms name=".MyCookie" loginUrl="~/Registration.aspx" protection="All" timeout="43200" path="/">
<credentials passwordFormat="MD5">
<user name="user" password="ca064d0730abfeb09e383a0e82e65f73"/>
</credentials>
</forms>
</authentication>
<authorization>
<deny users="?"/>
<allow roles="Moderator"/>
<deny users="*"/>
</authorization>
</system.web>
</configuration>
The error that I get:
Error 3 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. 5
I am trying to redirect any anonymous users from the administrator and moderator directories.. so I want any anonymous user or users with no role to be redirected to register.aspx..but i dont get it to work because I get that error and I dont know why!! :(