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

Namespace:  Novalys.VisualGuard.Security
Assembly:  Novalys.VisualGuard.Security (in Novalys.VisualGuard.Security.dll) Version: 3.2.912.1 (3.2.912.01)

Syntax

C#
public static VGSecurityRuntime CreateRuntimeForFile(
	string repositoryName,
	VGAuthenticationMode supportedAuthenticationModes,
	bool anonymousSessionSupported,
	Guid applicationId,
	string repositoryPath,
	int cacheDuration
)
Visual Basic (Declaration)
Public Shared Function CreateRuntimeForFile ( _
	repositoryName As String, _
	supportedAuthenticationModes As VGAuthenticationMode, _
	anonymousSessionSupported As Boolean, _
	applicationId As Guid, _
	repositoryPath As String, _
	cacheDuration As Integer _
) As VGSecurityRuntime

Parameters

repositoryName
Type: System..::.String
the name of the repository
supportedAuthenticationModes
Type: Novalys.VisualGuard.Security..::.VGAuthenticationMode
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
Type: System..::.Boolean
A boolean value indicating whether the security runtime supports anonymous session.
applicationId
Type: System..::.Guid
The Visual Guard unique identifier of the application managed by the security runtime.
repositoryPath
Type: System..::.String
The path of the folder containing the repository files.
cacheDuration
Type: System..::.Int32
The length of time in seconds that Visual Guard caches a repository item before trying to reload them from the repository.

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

ExceptionCondition
System..::.ArgumentNullException repositoryName or repositoryPath is null (Nothing).
System..::.ArgumentException repositoryName is an empty string.

- or-

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

See Also