Re: Checking IsAuthenticated for new ASP.NET session

From: Richard (richardhuff_at_gmail.com)
Date: 01/24/05

  • Next message: Paul Clement: "Re: redirecting to specific webpage after logging in - ASP.NET 2.0"
    Date: 24 Jan 2005 06:07:36 -0800
    
    

    I already have formsauthentication set up. Read my original post over
    again...my issue is that I do not want to redirect a user to the login
    page if they go to my index.aspx page. However, on my index.aspx page I
    would like to grab user specific information IF they have a persistant
    cookie.

    With formsauthentication, I am stuck with 2 options that do not work
    for my site:
    1) force authentication by denying authorization to index.aspx for all
    users. Thus, making login.aspx my new default page for new users.

    2) allow authorization for all to see index.aspx, but will not be able
    to tell if they are persistantly authorized (cookie). Thus, no "hello
    'siteUser', you are currently logged in", and no menu specific changes
    on the site.

    To be more specific, lets say you are an admin user and this is your
    first time to the site. When you come to my site without ever having
    logged in, you see 4 javascript menus on the home page, just as any
    other visitor would. Once you log in as admin, you are redirected to
    the home page, but all the pages now have 5 javascript menus. Keep in
    mind, chkPersistantCookie.Checked = true during the login process.

    Now, the session is completely closed...no more browser windows.

    What happens on next visit:
    User as admin goes to the home page and sees 4 menus, even though the
    cookie is persistant and they have already been authorized. If the user
    goes to a protected page, from there on there are 5 menus again. So,
    the user doesn't think he is initially logged in and typically goes to
    the login page without needing to (even though it doesn't look it, but
    the user is authorized).

    What needs to happen on next visit:
    User as admin goes to the home page and sees the 5th menu. Now the user
    knows he is logged in and can navigate to the pages under the 5th menu.


  • Next message: Paul Clement: "Re: redirecting to specific webpage after logging in - ASP.NET 2.0"

    Relevant Pages

    • web.config and authentication in sub-dirs
      ... I'm in need of two separate login pages for two different sub-dirs. ... Root ... Admin ...
      (microsoft.public.dotnet.framework.aspnet.security)
    • Re: getting me ducks in a row - concepts
      ... Don't create local login accounts for users, ... >> admin types know the local administrator credentials on all PCs. ... You don't load QB on the server - the registry keys or files/folders would ...
      (microsoft.public.windows.server.sbs)
    • User Management Question
      ... I have one user login whose name is "Admin" - and another user login ... documents and settings in my "Admin" ... folders in the folder. ...
      (microsoft.public.windowsxp.general)
    • User Management Question
      ... I have one user login whose name is "Admin" - and another user login ... documents and settings in my "Admin" ... folders in the folder. ...
      (microsoft.public.windowsxp.customize)
    • User Management Question
      ... I have one user login whose name is "Admin" - and another user login ... documents and settings in my "Admin" ... folders in the folder. ...
      (microsoft.public.windowsxp.customize)