Adds a new role to the repository.
Namespace:
Novalys.VisualGuard.Security.WebFormAssembly: Novalys.VisualGuard.Security.WebForm (in Novalys.VisualGuard.Security.WebForm.dll) Version: 3.2.912.1 (3.2.912.01)
Syntax
C# |
---|
public override void CreateRole( string roleName ) |
Visual Basic (Declaration) |
---|
Public Overrides Sub CreateRole ( _ roleName As String _ ) |
Parameters
- roleName
- Type: System..::.String
The name of the role to create.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | roleName is null (Nothing in VB.Net). |
System..::.ArgumentException | roleName is empty or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').
or roleName is longer than 64 characters. |
System.Security..::.SecurityException | The current user has not enough privileges to use Membership API. The Membership access level of the application must be sufficient to allows this action or the 'Membership Manager' role must be granted to the user by using the Visual Guard console. |