G
Guest
Hi
I'm trying to get forms-based authentication to authenticate different users
for differet pages, like this:
<configuration>
<location path="Member" allowOverride="true">
<system.web>
<authorization>
<!-- allow tags must be first -->
<allow users="Admin"/>
<allow users="User"/>
<deny users="*"/>
</authorization>
<authentication mode="Forms">
<forms
name="MyWebsiteCookieName"
loginUrl="LoginPage1.aspx"
protection="All"
timeout="180"
/>
</authentication>
</system.web>
</location>
<location path="Admin" allowOverride="true">
<system.web>
<authorization>
<!-- allow tags must be first -->
<allow users="Admin"/>
<deny users="*"/>
</authorization>
<authentication mode="Forms">
<forms
name="MyWebsiteCookieName"
loginUrl="LoginPage2.aspx"
protection="All"
timeout="180"
/>
</authentication>
</system.web>
</location>
</configuration>
But here I get this error:
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.
Many thanks for your help
Simon
I'm trying to get forms-based authentication to authenticate different users
for differet pages, like this:
<configuration>
<location path="Member" allowOverride="true">
<system.web>
<authorization>
<!-- allow tags must be first -->
<allow users="Admin"/>
<allow users="User"/>
<deny users="*"/>
</authorization>
<authentication mode="Forms">
<forms
name="MyWebsiteCookieName"
loginUrl="LoginPage1.aspx"
protection="All"
timeout="180"
/>
</authentication>
</system.web>
</location>
<location path="Admin" allowOverride="true">
<system.web>
<authorization>
<!-- allow tags must be first -->
<allow users="Admin"/>
<deny users="*"/>
</authorization>
<authentication mode="Forms">
<forms
name="MyWebsiteCookieName"
loginUrl="LoginPage2.aspx"
protection="All"
timeout="180"
/>
</authentication>
</system.web>
</location>
</configuration>
But here I get this error:
It is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.
Many thanks for your help
Simon