3
votes

When is the LastActivityDate supposed to be updated? When I click on any other pages in my web application as an authenticated user, the LastActivityDate does not get updated.

I would imagine it should be updated when a user clicks on any page, whether it be to do with membership (change password, GetUser(), etc) or not. But the examples that I have seen, seem only to update it on ValidateUser().

http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.lastactivitydate.aspx

Under Remarks, it says to do it under ValidateUser method.

When do you update the LastActivityDate? Just inside ValidateUser()?

Thanks

Update: Clarified question.

1
I didn't understood your problem, can you please rephrase it?Rubens Farias
I've rephrased my question nowMike

1 Answers

1
votes

No, for it to get updated on each page request would require your pages to update it manually, but that would be a bad idea.

The LastActivityDate refers to last activity within the domain of the membership provider i.e. authentication token request, change password etc.

If you want to track page request per user that would be another domain, as is typically implemented as a log file of all page request per user.