I've just begun to extend the membership framework for .NET. I've noticed that aspnet_Membership_GetUserByName has the potential to update LastActivityDate in aspnet_Users, but actually will not ever do the update. The "problem" (unless this is intentional) is that @UserId is never set in the select statement before the update statement, i.e. there is no "@UserId = u.UserId" in the Select.
So is this a problem with my installation, a "bug", or is it intentional It seems I'm not the only person to notice this (Membership.GetUser() doens't update lastactivitydate), but that post didn't receive an answer.
Andy

Bug or intentional: aspnet_Membership_GetUserByName does not update LastActivityDate
THaines
Hi Andy,
Based on my understanding, you have extended memship framework.
Can you post how did you do that I mean you implement MembershipProvider directly or derived from SqlMembershipProvider.
To isolate the problem, I think you may try to run the SqlMembershipProvider GetUser sample as below to see if the LastActivityDate is updated, so that we will know if the problem is within your code or the SqlMembershipProvider itself.
SqlMembershipProvider.GetUser Method (String, Boolean)
http://msdn2.microsoft.com/en-us/library/fef7wk3k.aspx
If you still have any concern, please feel free to post here.
Best regards,
Peter Huang
Sangeetha_AS
The people there will give you the best advice and meybe they know a solution to this buggy-behaviour!
Please post the question on: http://forums.asp.net/.
agbeko
Actually, I've already posted there as well as I wasn't sure where to post and didn't realise that this and forums.asp.net were related forums.
Here's the link:
http://forums.asp.net/thread/1297936.aspx
Peter,
Thanks for your post. Just to clarify; this appears to a problem in the stored procedure aspnet_Membership_GetUserByName that ships with the membership framework. I haven't, as yet, extended the membership framework.
If you have any ideas, it would be great if you could write more on the post from the link I've given here.
Andy
nikorn sakul
Thanks for the fast and clear reply AGBrown. Everyone who want's to react on this post, please post in the thread on the ASP.NET Forum so that other users that search there can find the thread easy.
Thanks!