Storage modes of configurations

Sitefinity has the following modes for storing configuration files:

Auto-storage mode

Environment configurations are stored on the file system and application settings in the database. This means that the configuration value persistence depends on what API is used.
  • The default persistence API stores the config values in the database.
  • Advanced/Basic settings UI use API that explicitly stores the values in the filesystem (assuming that what is updated from advanced setting is always a configuration), except if the updated config element already lives in the database.

Environment configurations can be made read-only on the Live environment.

Advantages

  • This storage mode allowed for safe runtime modification of application settings when load-balanced.
  • This storage mode allows you to apply configuration transformations during delivery easily.
    When read-only mode of configurations is turned on on the Live environment, configurations remain the same on all instances of the load-balancing. It also prevents changes to environment configurations to be made runtime.

Limitations: Synchronization of labels and messages between the nodes of a load-balanced environment has to be done manually.
For more information, see NLB: Synchronize labels and messages between the nodes from a load balanced setup.

NOTE: By default, Sitefinity CMS uses Auto-storage mode for its configurations. This is the recommended configuration storage option. FileSystem and Database storage modes are legacy options and are available for backward compatibility.

FileSystem 

Configurations are stored on the file system

Advantages: This storage method allows you to apply configuration transformations during delivery easily.

Limitations:

  • Subsequent deployment overwrites environment configurations and application settings made runtime.
    Configuration files contain not only environment configurations, but also application settings that needed to be modified runtime. Therefore, there is no way to push environment configuration changes with the source code, without overwriting the change to application settings made runtime. You have to manually apply these changes on the Live database.
  • Prevents Sitefinity CMS to run in a load-balanced scenario
    Each instance from the load-balancing has its own configuration files and with time configurations between different nodes become inconsistent.

FileSystem (shared location) 

Configurations are stored on the FileSystem, but on shared location.

Advantages:

  • This storage method allows you to apply configuration transformations during delivery easily.
  • It also allows Sitefinity CMS to safely modify configurations and settings during runtime when load-balanced, because all nodes can share the configurations.

Limitations:

  • Subsequent deployment overwrites environment configurations and application settings made runtime.
  • Creates availability issues during deployment to Live and creates concurrency issues.

Database 

Configurations are stored in the Database

Advantages: This storage mode allowed for safe runtime modification of application settings when load-balanced.

Limitations: If different environments are required, different configuration values are harder to maintain if needed.

Priorities in applying configurations

When applying configurations, Sitefinity CMS has the following hierarchy:

  1. Environment variables have the highest priority. These are variables managed by the environment and can be stored in the web.config file.
  2. Configurations persisted in the database in sf_xml_config_items database table.
  3. FileSystem configurations stored in .../App_Data/Sitefinity/Configuration.
  4. Default configuration values declared in the code.


The following table summarizes the applications of the different configuration storage modes:

  FileSystem FileSystem
(shared location)
Database Auto
Transfer environment configurations published2
published2 reject published2
Keep application settings made runtime
reject
reject published2 published2
Load balancing
reject published2 published2 published2
Continuous delivery
reject reject reject published2

 

IMPORTANT: When using database or FileSystem storage, you cannot use Continuous delivery. You can switch from database storage to FileSystem storage mode by migrating the configurations. For more information, see Migrate configurations. To work in Auto-storage mode and use Continuous delivery, you can switch from FileSystem storage mode to Auto-storage mode. For more information, see Turn on Auto-storage mode for configurations.
Once you switch to Auto-storage mode, you cannot get back to the other configuration storage modes.

Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?