[英]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.
该应用程序基于.Net。
I found the MemberShip class provides the Last Activity date. 我发现MemberShip类提供了上次活动日期。 However, this does not work when the MemberShip provider is ActiveDirectory Link to MSDN page because the ActiveDirectoryMemberShipUser does not implement the LastActivityDate property.
但是,当MemberShip提供程序是ActiveDirectory 链接到MSDN页面时,这将不起作用,因为ActiveDirectoryMemberShipUser没有实现LastActivityDate属性。
Is there any workaround or other way, I can get the LastActivityDate of the user in the application. 有任何解决方法或其他方法,我可以在应用程序中获取用户的LastActivityDate。
Thanks for any info 谢谢你的任何信息
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. 问题在于,AD不能维护准确的上次登录时间戳,因此确定上一个活动将需要搜索域控制器“安全事件日志”。
http://blogs.technet.com/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx http://blogs.technet.com/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.