A string array containing the names of all the roles that the currently logged-on user is in.
The Roles.GetRolesForUser method calls the RoleProvider.GetRolesForUser(string) method of the default role provider to retrieve from the data source the roles that the currently logged-on user is in. The currently logged-on user is identified by the System.Web.HttpContext.User property of the current System.Web.HttpContext, or by System.Threading.Thread.CurrentPrincipal for non-HTTP hosting environments. If no user is logged on, an exception will be thrown. Only the roles for the application that is specified in the Roles.ApplicationName property are retrieved.
If Roles.CacheRolesInCookie is true, then the results of the Roles.GetRolesForUser method may be returned from the role cache rather than the specified role provider.