FBA with Custom login page.
Users are authenticated through default LDAPMembership provider. In AD "LastLogOn" property is not always updated.
What is the correct way to get actual last LogOn date for the current user?
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It only takes a minute to sign up.Sign up to join this community
lastLogon is for interactive logons, not network logons. In addition, lastLogon is only processed against the Domain Controller that the user was authenticated against.
Take a look at http://blogs.technet.com/b/askds/archive/2009/04/15/the-lastlogontimestamp-attribute-what-it-was-designed-for-and-how-it-works.aspx for further information about the other attribute commonly used, lastLogonTimestamp, which is replicated between Domain Controllers, but has a randomness introduced for updates.
The solution which worked well in this scenario was to create a custom AD attribute and use it to store/retrieve exact login time.