System.Web.Security.SqlMembershipProvider.GetNumberOfUsersOnline Method

Returns the number of users currently accessing the application.

Syntax

public override int GetNumberOfUsersOnline ()

Returns

The number of users currently accessing the application.

Remarks

This method is called by the System.Web.Security.Membership class to retrieve the number of users considered online from the SQL Server database specified in the ASP.NET application's configuration file (Web.config).

SqlMembershipProvider.GetNumberOfUsersOnline returns the number of users of the current application whose last activity date and time is greater than the current date and time less the value of the Membership.UserIsOnlineTimeWindow property in minutes.

Only users associated with the configured SqlMembershipProvider.ApplicationName are included in the count.

Requirements

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