System.Web.Security.Roles.GetAllRoles Method

Gets a list of all the roles for the application.

Syntax

public static string[] GetAllRoles ()

Returns

A string array containing the names of all the roles stored in the data source for the application.

Remarks

The Roles.GetAllRoles method calls the RoleProvider.GetAllRoles method of the default role provider to get a list of all the roles from the data source for an application. Only the roles for the application that is specified in the Roles.ApplicationName property are retrieved.

Requirements

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