Two Different FormsAuth Logins for Same Application

Discussion in 'ASP .Net' started by =?Utf-8?B?QWxleCBNYWdoZW4=?=, Sep 10, 2006.

  1. I have what I'd *like* to be a single web application (meaning, shares the
    same Session object for a given user, etc.). But I'd like to configure it for
    FormsAuthentication so that if the user goes into most of the directories
    before he's authenticated, he'll go to one Login.aspx whereas if he goes for
    the first time to, say, "/Admin/*", he gets a different Login.aspx page. Both
    pages will end up authenticating the user the same way, but the UI, etc., of
    the Login pages will be dramatically different. Is there any way to configure
    this in web.config files? Or do I have to do it programatically in the
    Login.aspx page?

    =?Utf-8?B?QWxleCBNYWdoZW4=?=, Sep 10, 2006
    1. Advertisements

  2. Hi Alex,

    I recommend you to protect "/Admin/*" with another role, such as "Admins",
    as distinguished from a normal user role "Users". You still use one single
    Login.aspx configured using Forms authentication, but when a normal user
    tries to visit a resource under "/Admin", he or she will be redirected to
    the login page again and if he or she enters a user account which is in the
    "Admins" role, will be able to access the resource.

    From your question, I'm not sure if this fulfills your requirement, please
    feel free to post here if I've misunderstood anything.

    Walter Wang (, remove 'online.')
    Microsoft Online Community Support

    Get notification to my posts through email? Please refer to
    ications. If you are using Outlook Express, please make sure you clear the
    check box "Tools/Options/Read: Get 300 headers at a time" to see your reply

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at

    This posting is provided "AS IS" with no warranties, and confers no rights.
    Walter Wang [MSFT], Sep 11, 2006
    1. Advertisements

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. Christopher Brewster
    John Machin
    Nov 14, 2008
  2. bluebaron
    Jonathan N. Little
    Nov 4, 2009
  3. Jeff

    FormsAuth and Sessions Troubles...

    Jeff, Aug 20, 2003, in forum: ASP .Net Security
  4. George Durzi

    FormsAuth Ticket Keeps Expiring

    George Durzi, Sep 18, 2003, in forum: ASP .Net Security
    George Durzi
    Sep 18, 2003
  5. Liming

    Two Logins within the same site

    Liming, Apr 12, 2006, in forum: ASP .Net Security
    genc ymeri
    Apr 16, 2006

Share This Page