M
Maziar Aflatoun
Hi everyone,
I have a website that requires 2 separate sections to be password protected
(/admin and /admin2) so that for ex. once the user in /admin2 is
authenticated he/she can then view everything in /admin2 only without
restrictions. I have managed to make it work for 1 /admin and it works
great. Can someone please tell me how I can define different section
protections?
This is what I have to get /admin working
In my root Web.config I have
<authentication mode="Forms">
<forms loginUrl="admin/Login.aspx" protection="All" timeout="30" path="/">
</forms>
</authentication>
In my /admin I have
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
and same in my /admin2
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
but now / works (requires no authentication)
/admin and /admin2 both require authentication. But that's not what I want.
I want /admin to go to /admin/Login.aspx and /admin2 to go to
/admin2/Login2.aspx
Thank you
Maz
I have a website that requires 2 separate sections to be password protected
(/admin and /admin2) so that for ex. once the user in /admin2 is
authenticated he/she can then view everything in /admin2 only without
restrictions. I have managed to make it work for 1 /admin and it works
great. Can someone please tell me how I can define different section
protections?
This is what I have to get /admin working
In my root Web.config I have
<authentication mode="Forms">
<forms loginUrl="admin/Login.aspx" protection="All" timeout="30" path="/">
</forms>
</authentication>
In my /admin I have
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
and same in my /admin2
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
but now / works (requires no authentication)
/admin and /admin2 both require authentication. But that's not what I want.
I want /admin to go to /admin/Login.aspx and /admin2 to go to
/admin2/Login2.aspx
Thank you
Maz