Click or drag to resize

Generate Visual Guard configuration files

How to generate or edit the Visual Guard configuration files

The Visual Guard runtime integrated in your application needs 2 configuration files to work. These two files are generated by the Visual Guard console and contain information about the repository used by the application:

  • Information about access to the repository (repository path, database connection string ...).
  • The authentication mode supported by the repository.
  • The support of anonymous session.
  • The Visual Guard unique identifier of the application.
  • The duration of the cache.
  • The support of Windows Groups

The Visual Guard console will generate 2 files: VisualGuardConfiguration.exe.config and VisualGuardConfiguration.config.

By default, these files must be deployed with your application and must be located in the same directory as the Novalys.VisualGuard.Security assembly.

For Winform application, you can change the path of these files by setting the VGSecurityManagerConfigurationFile property.

For ASP.Net application, you can change the path of these files by handling the global application event VGHttpModule.Initialized

For WCF application, you can change the path of these files by handling the event VGServiceRuntimeProvider.RuntimeInitialized

When is it necessary to regenerate your configuration files?

You must regenerate the configuration files:

  • Each time you need to change the Visual Guard repository connected to your application.
  • When you change the authentication mode supported by the repository.
  • When you enable or disable the anonymous session.
  • When you change the information about the connection to the repository (server, schema or database name, credentials, repository path, ...)
  • When you create a new version of the application by using the console and you want to access to this new version from your application.
Generate the configuration files of an application

To generate the configuration files of an application, you must:

  • Open the Visual Guard Console.
  • Connect to the Visual Guard repository to which the application must be connected.
  • Right-click on the application node and select the "Generate Visual Guard configuration files" option.
  • Select the directory containing the assemblies of the application.
Edit the configuration file

If you want to change some parameters of a configuration, you can edit the VisualGuardConfiguration.config file with a text editor or use the Visual Guard console:

  • Open the Visual Guard Console.
  • Click on the menu option "File > Edit Configuration File".
  • Select the main Visual Guard configuration file of your application (by default this file is named "VisualGuardConfiguration.exe.config").
  • Modify the properties of your configuration.
  • Click on the "OK" button to validate the modification.
See Also

VGSecurityManagerConfigurationFile Change programatically the name or the location of the Visual Guard configuration files.