Visual Guard Class Library Documentation

VGMembership.ConvertUsernameToRepositoryId Method 

Converts the username of a user to a Visual Guard unique repository id for the specified authentication mode

public static string ConvertUsernameToRepositoryId(
   String username,
   VGAuthenticationMode mode
);

Parameters

username
the username to convert
mode
the Visual Guard authentication mode

Return Value

A Visual Guard unique repository id

Remarks

The Visual Guard unique repository id is used by Visual Guard to identify uniquely a user account in a Visual Guard repository.

Exceptions

Exception Type Condition
ArgumentNullException username is null.
ArgumentException username is empty.

- or -

mode is equal to VisualGuard and is longer than 64 characters or contains invalid chars ('\', '/', '?', '*', '%', ';', ''', '"', ':', '|', '[', ']', '+', '=', ',').

- or -

mode is equal to Windows and username cannot be converted to a valid SID.

- or -

mode is not equal to Windows or VisualGuard or Database or is a combination of several values.

See Also

VGMembership Class | Novalys.VisualGuard.Security.Membership Namespace | RepositoryId