Adds a new role to the repository.

Namespace:  Novalys.VisualGuard.Security.WebForm
Assembly:  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

ExceptionCondition
System..::.ArgumentNullExceptionroleName is null (Nothing in VB.Net).
System..::.ArgumentExceptionroleName is empty or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

or

roleName is longer than 64 characters.
System.Security..::.SecurityExceptionThe 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.

See Also