System.Web.Security.MembershipUser.IsOnline Property

Gets whether the user is currently online.

Syntax

public bool IsOnline { get; }

Value

Documentation for this section has not yet been entered.

Remarks

A user is considered online if the current date and time minus the Membership.UserIsOnlineTimeWindow property value is earlier than the MembershipUser.LastActivityDate for the user.

The MembershipUser.LastActivityDate for a user is updated to the current date and time by the erload:System.Web.Security.Membership.CreateUser, Membership.UpdateUser(MembershipUser) and Membership.ValidateUser(string, string) methods, and can be updated by some of the overloads of the erload:System.Web.Security.Membership.GetUser method.

Note:

The MembershipUser.LastActivityDate property value for a user is updated by the classes in the System.Web.Profile and the System.Web.UI.WebControls.WebParts namespaces whenever user data is retrieved from or set at the data source. If your application uses the same data source to store user information, and your System.Web.Profile.ProfileProvider and System.Web.UI.WebControls.WebParts.PersonalizationProvider are configured with the same applicationName as your System.Web.Security.MembershipProvider, then the MembershipUser.LastActivityDate and MembershipUser.IsOnline properties of the user will reflect this behavior.

Requirements

Namespace: System.Web.Security
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0