Two Logins within the same site

Discussion in 'ASP .Net Security' started by Liming, Apr 12, 2006.

  1. Liming

    Liming Guest

    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.
    Liming, Apr 12, 2006
    #1
    1. Advertising

  2. 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.)
    Luke Zhang [MSFT], Apr 12, 2006
    #2
    1. Advertising

  3. Liming

    genc ymeri Guest

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


    "Luke Zhang [MSFT]" <> wrote in message
    news:...
    > 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.)
    >
    genc ymeri, Apr 16, 2006
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. anoj
    Replies:
    6
    Views:
    17,825
    Darrin J. Olson
    Dec 30, 2004
  2. Shawn
    Replies:
    2
    Views:
    366
    =?Utf-8?B?RWx0b24gVw==?=
    Feb 19, 2006
  3. darrel
    Replies:
    2
    Views:
    464
    darrel
    Apr 5, 2006
  4. =?Utf-8?B?QWxleCBNYWdoZW4=?=

    Two Different FormsAuth Logins for Same Application

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Sep 10, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    358
    Walter Wang [MSFT]
    Sep 11, 2006
  5. Replies:
    8
    Views:
    682
Loading...

Share This Page