views:

159

answers:

2

I'm using SqlMembershipProvider and trying to get information about users using the GetAllUsers's method of the System.Web.Security namespace, but it doesn't retrieve any online user.

I'm logged into the application, but my user appeared as offline too.

Why could this happen?

A: 

Check to see if the LastActivityDate is updated in the aspnet_Users table.

If it isn't, then try getting the user's details with the online flag set to true (when they log in.

e.g.

Membership.GetUser(username, true);

Also worth seeing what your UserIsOnlineTimeWindow is set too.

davewasthere
+1  A: 

Check out this Microsoft Connect article, there is a bug in the stored procedure that ships with asp.net 2.0, LastActivityDate doesn't get updated. The isOnline property is based on last activity.

Duvid Rottenberg