Page view counter

how to deny access to someone while using persistant cookies

Last post 03-05-2008 10:30 PM by XiaoYong Dai – MSFT. 4 replies.

Sort Posts:

  • how to deny access to someone while using persistant cookies

    03-01-2008, 12:00 PM
    • Loading...
    • bmaster
    • Joined on 02-29-2008, 7:15 AM
    • Posts 6
    • Points 8

    The website I'm trying to make is for our customers, and they can login to see our prices for example. I'm using forms authentication with persistant cookies so that the customers don't have to retype their passwords every time. The database with logins is maintained by other software, and people are not allowed to create new logins. This all works fine.

    Imagine the following situation: an employee of one of these customers has the password to our site, and uses it on his computer at home. So far so good. The next day this employee gets fired, and his boss changes the password so that the employee cannot enter the site anymore. The employee at home still has the persistant cookie and can still login with no problems, because the password is only validated the first time he logs in... I hope that this explanation makes sense!

    Is there a way to fix this? I could store the password in a cookie and recheck it every login, but passwords in cookies are not-done, so I guess that's not the best solution.

  • Re: how to deny access to someone while using persistant cookies

    03-01-2008, 11:52 PM
    • Loading...
    • norchnou
    • Joined on 01-08-2007, 1:41 AM
    • Posts 279
    • Points 672

    you should create alternate Users that are managed by the main User

    dont ask me how to do it ;-)

     

  • Re: how to deny access to someone while using persistant cookies

    03-04-2008, 3:36 AM

    Hi

    Please view my post in this thread on how to check user information at Application_AuthenticateRequest event when he/she returns to your website 

    http://forums.asp.net/t/1206047.aspx

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
  • Re: how to deny access to someone while using persistant cookies

    03-05-2008, 5:41 AM
    • Loading...
    • bmaster
    • Joined on 02-29-2008, 7:15 AM
    • Posts 6
    • Points 8

    Thanks for your reply!  I've read that post, but I don't see how that can be a solution. The "CheckUser_deleted_disabled_passwordChanged_otherCondition" function has to return true if, for example, the password has changed. But how do I know if the password has changed?

  • Re: how to deny access to someone while using persistant cookies

    03-05-2008, 10:30 PM
    Answer

    bmaster:
    But how do I know if the password has changed?
     

    Hi

    The SqlMembershipUser has the CreationDate, LastLoginDate, LastActivityDate, and LastPasswordChangedDate property. You can just check the date and time when the user was last authenticated(LastLoginDate), then look into the date and time when the membership user's password was last updated(LastPasswordChangedDate). If the LastLoginDate is even before LastPasswordChangedDate, mean people should re-authenticate.

     

    Best Regards
    XiaoYong Dai
    Microsoft Online Community Support

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Page 1 of 1 (5 items)