Two Logins within the same site

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.
 
L

Luke Zhang [MSFT]

Hello,

I think we cannot tell if someone is a common user or an administrator,
before he actaully input his account and password. A exclusive login is
still required here. You may argue this with your designer: since we cannot
tell if he is a admin when the first user interface is dispaly, how can we
diaplay different content? How do you think it?


Luke Zhang
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

(This posting is provided "AS IS", with no warranties, and confers no
rights.)
 
G

genc ymeri

how can we diaplay different content? How do you think it?
What a MS support..... impressed !!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top