views:

175

answers:

1

Hi,

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.

A: 

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

TFD
Thanks for clarifying that. I guess I don't need to make it on the latest request.
Mike