Returns the number of users currently accessing the application.
Assembly: System.Web (in System.Web.dll)
This method is called by the 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).
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 UserIsOnlineTimeWindow property in minutes.
Only users associated with the configured ApplicationName are included in the count.
The following code example returns a list of users with a count of the users currently online.
This example uses the Membership class to call the SqlMembershipProvider specified as the defaultProvider in the Web.config file. If you need to access the default provider as the type SqlMembershipProvider, you can cast the Provider property of the Membership class. To access other configured providers as a specific provider type, you can access them by their configured name with the Providers property of the Membership class and cast them as the specific provider type.