user320587
user320587

Reputation: 1367

How to get LastActivityDate when using Active Directory Setup in a .net application

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

Upvotes: 0

Views: 1004

Answers (1)

Chris Taylor
Chris Taylor

Reputation: 53729

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

Upvotes: 1

Related Questions