Alert User to change password.

Posted on 2009-02-13
Last Modified: 2013-12-17

I am using SQL2005 n .Net 3.5

I have a field in my table as Updatedate which contain last update date of the password.

Now I want to force user to change his password after 60 days.Before this,I want to remind him for the password change from 54th day.

6 days left.
55th day 5 days left
60 th day.0 days left and now you have to change the password.

How to do this?
Question by:rajputamitd
    LVL 26

    Expert Comment

    create a stored procedure to control the password expiration and prepare your massages. In your application do always call this procedure while user login in as the first job. And take the required steps that neede to do...

    Author Comment

    Can you guide me or show an example how to write such store procedure.
    Thank u.
    LVL 6

    Accepted Solution

    Either try this in code behind.
    Just take the date value from updatedate field. Take days from the Date. Subtract it from Current date.

    Then check it the number of days is greater than 53.
    if(dt >53)
         int days = 60 - dt;
         label1.text = days + "days left";

    Author Comment

    Thanks 4 ur reply.I'll try it later n let you know.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Join & Write a Comment

    Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    This video discusses moving either the default database or any database to a new volume.

    733 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

    17 Experts available now in Live!

    Get 1:1 Help Now