Custom Member List LastActivityDate

When do I need to update LastActivityDate? When I click on other pages of my web application as an authenticated user, LastActivityDate is not updated.

I would suggest that it should be updated when the user clicks on any page, regardless of whether it needs to be done with membership (change password, GetUser (), etc.) or not. But the examples I saw seem to only update it on ValidateUser ().

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

The Remarks section says that this is done using the ValidateUser method.

When do you update LastActivityDate? Only inside ValidateUser ()?

thank

Update: Clarified Question.

+3
source share
1 answer

No, in order for it to be updated in every page request, you will need to manually refresh its pages, but that would be a bad idea.

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

If you want to track the page request for each user, which will be a different domain, as usual, is used as a log file for all page requests for each user.

+1
source

Source: https://habr.com/ru/post/1732448/


All Articles