views:

55

answers:

1

Hi, I have a requirement to show a list of all users along with the Last Activity Date. The application is .Net based.

I found the MemberShip class provides the Last Activity date. However, this does not work when the MemberShip provider is ActiveDirectory Link to MSDN page because the ActiveDirectoryMemberShipUser does not implement the LastActivityDate property.

Is there any workaround or other way, I can get the LastActivityDate of the user in the application.

Thanks for any info

+1  A: 

The problem is that the AD does not maintain an accurate last logon time stamp so determining the last activity would require searching through the domain controllers Security Eventlog.

http://blogs.technet.com/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx

Chris Taylor
Thanks ChrisOk. So, I feel the only way is to maintain the last activity date within the application somewhere.
@user320587: I we faced this problem and opted to track this information in the database. What we do is when the user logs into the system we create a ticket in the DB and that ticket is passed into our business layer for every request, which in turn updates the ticket's 'last used time' this way we can track when the operator started working and when the last action was taken.
Chris Taylor