Limit access time with membership

Posted on 2008-11-20
Last Modified: 2012-08-14

I have a webapplication where I would like to extend the membership possibilities with a couple functions that I haven't found anywwhere.

I would like to set a date and time for when users automatically are locked out from the system,.
I would like to be able to force every user to enter a new password on login every three month.

Does anyone know if these features are availbable in some way in membership (I know they are in Active directory, but I don't plan to use that), or to I have to create my own solution for it?

Thanks for help!

Question by:peternordberg
    LVL 15

    Expert Comment

    Unless you set thier active directory information to expire or to require new user validation your going to have to create a solution for this. It is fairly simple to do so. You can validate user credentials & membership information on login.
    LVL 3

    Accepted Solution

    Well I'm using membership now and haven't seen that kind of functions.
    You will have to do it all by yourself but the login control has an event where you can hook in

    Sub OnAuthenticate(ByVal sender As Object, ByVal e As AuthenticateEventArgs)

    You can put your own code in this to check what the status is of your user trying to login.
    - When everything is ok
    - you can use Membership.ValidateUser( username, password)

    - when everything is not ok
    - you can set e.Authenticated = false


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
    It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    9 Experts available now in Live!

    Get 1:1 Help Now