How do I set the LastLoginDate of the Membership user class to the UTC time instead of the server time?
The following code does not work even though LastLoginDate is a settable property.
Protected Sub Login1_Authenticate(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.AuthenticateEventArgs) Handles Login1.Authenticate
Dim user As MembershipUser = Membership.GetUser(Login1.UserName)
If user IsNot Nothing Then
If Membership.ValidateUser(Login1.UserName, Login1.Password) Then
user.LastLoginDate = DateTime.UtcNow()
e.Authenticated = True
End If
End If
End Sub
I also tried to do in Login1_LoggedIn
and Login1_LoggingIn
events and no luck.