My case:
I have 2 folders Admin , Users
In Admin folder :main.aspx, admin.aspx
In users folder :usr.aspx,process,employee
In root :Login.aspx and Default.aspx
What i want to do : If username=admin and password=admin it redirect and access admin folder and if username=user and
password = user it redirect and access user folder ..
And users account can not access admin folder
I used in webconfig the following:
<authentication mode="Forms">
<forms name=".1" loginUrl="login.aspx"
protection="All" path="/" timeout="30" />
</authentication>
<!--<authorization>
<deny users ="?" />
<allow users = "*" />
</authorization>-->
</system.web>
<location path="Admin" >
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
<location path="Users">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
I try every code i have know like redirect page and FormsAuthentication but it gives access to all folder and not eache