L
Liming
Hello,
I have a portal in ASP.NET 2.0 which has a login page for users and a
sepearte login for admin.
the folder structure looks like so..
/users/
profile.aspx
login.aspx
/admin
controlpanel.aspx
login.aspx
The reason I have two sepeparte login pages is because
1) Designer have very different designs for each. Part of the requirement
2) Depending on which login.aspx is accessed, we need to redirect by default
to it's coressponding default page. (user goes to profile.aspx if no
returnurl is detected and admin goes to controlpanel.aspx)
so my question is in my web.config, how do I configure this for
authentication mode="forms"? currently if I set
loginurl="/users/login.aspx". that's obviously not an option because if they
try to access an admin page within the admin folder, I needed to redirect
them to /admin/login.aspx"
If there is only one page say /login.aspx, then everyting is simple. i do
loginurl="login.aspx"
and in my code behind, I can check if a User.IsInRole("Admin"), redirect to
"controlpanel.aspx", else redirect to "profile.aspx". But that's not the
case unforuntately.
thanks. any suggestions is greatly appreicated.
I have a portal in ASP.NET 2.0 which has a login page for users and a
sepearte login for admin.
the folder structure looks like so..
/users/
profile.aspx
login.aspx
/admin
controlpanel.aspx
login.aspx
The reason I have two sepeparte login pages is because
1) Designer have very different designs for each. Part of the requirement
2) Depending on which login.aspx is accessed, we need to redirect by default
to it's coressponding default page. (user goes to profile.aspx if no
returnurl is detected and admin goes to controlpanel.aspx)
so my question is in my web.config, how do I configure this for
authentication mode="forms"? currently if I set
loginurl="/users/login.aspx". that's obviously not an option because if they
try to access an admin page within the admin folder, I needed to redirect
them to /admin/login.aspx"
If there is only one page say /login.aspx, then everyting is simple. i do
loginurl="login.aspx"
and in my code behind, I can check if a User.IsInRole("Admin"), redirect to
"controlpanel.aspx", else redirect to "profile.aspx". But that's not the
case unforuntately.
thanks. any suggestions is greatly appreicated.