Visual Guard Class Library Documentation

VGSecurityRuntime.CreateRuntimeForFile Method (String, VGAuthenticationMode, Boolean, Guid, String, Int32, Boolean)

Creates a new instance of the VGSecurityRuntime class and initializes a connection to a repository based on files.

public static VGSecurityRuntime CreateRuntimeForFile(
   String repositoryName,
   VGAuthenticationMode supportedAuthenticationModes,
   Boolean anonymousSessionSupported,
   Guid applicationId,
   String repositoryPath,
   Int32 cacheDuration,
   Boolean includeWindowsGroups
);

Parameters

repositoryName
the name of the repository
supportedAuthenticationModes
A VGAuthenticationMode indicating the authentication mode supported by the security runtime. This value must be equal or a subset of the value defined in the repository.
anonymousSessionSupported
A boolean value indicating whether the security runtime supports anonymous session.
applicationId
The Visual Guard unique identifier of the application managed by the security runtime.
repositoryPath
The path of the folder containing the repository files.
cacheDuration
The length of time in seconds that Visual Guard caches a repository item before trying to reload them from the repository.
includeWindowsGroups
Indicates whether role granted to Windows Groups are included to the list of role of a user.

Return Value

A new instance of the VGSecurityRuntime class

Remarks

this method requires to deploy the assembly "Novalys.VisualGuard.Security.File.dll" with your application.

Exceptions

Exception Type Condition
ArgumentNullException repositoryName or repositoryPath is null (Nothing).
ArgumentException repositoryName is an empty string.

- or-

supportedAuthenticationModes is equal to None or indicates that database authentication mode is supported.
ArgumentOutOfRangeException cacheDuration is negative.

See Also

VGSecurityRuntime Class | Novalys.VisualGuard.Security Namespace | VGSecurityRuntime.CreateRuntimeForFile Overload List