Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
This topic provides an introduction to configuration in Episerver, and describes the configuration files and their structure in the Episerver platform, including the different files and elements used for storing configuration settings and the hierarchy within them.
When you install the Episerver platform, it places files that contain configuration data, connections, and log features in the wwwroot folder in each of the CMS and Commerce Manager websites.
Note: Previous releases of Episerver CMS used the configSource attibute to extract the episerver and the episerver.framework sections into separate files called episerver.config and episerverFramework.config.
You also may find the following configuration files in an Episerver installation:
You also may have feature-specific configuration files in the solution folder structures for CMS and Commerce.
Like all ASP.NET web applications, Episerver CMS stores configuration settings in the web.config located in the root directory of the application. ASP.NET uses functionality called configuration inheritance; the file in your project only contains changes and additions to the configuration found in the machine.config file, which is the base configuration for all applications on your machine.
The web.config file is separated into sections containing settings for a specific part of the application, usually based on namespaces. For example, the <system.web> section stores the settings used by the classes in the System.Web namespace. A list of section definitions at the top of web.config tells ASP.NET what sections this application uses in addition to the sections inherited from machine.config. A definition also tells ASP.NET what class to use when you create an object representation of the section. The following example shows a definition.
<section name="episerver.dataStore" type="EPiServer.Data.Configuration.EPiServerDataStoreSection, EPiServer.Data" />
The Episerver CMS API stores settings in several sections. If you scroll down in the web.config file, actual instances of the sections assign values to the section properties.
<episerver.dataStore>
<dataStore defaultProvider="EPiServerSQLServerDataStoreProvider">
<providers>
...
A configuration class can assess any Episerver CMS setting because all settings are typed members of the configuration class, which lets you see settings through IntelliSense. Access to the CMS application settings goes through the static object EPiServer.Configuration.Settings.Instance. You do not to instantiate this class because it is a global static available throughout the application.
The configuration files are in XML format and are divided into sections containing configurations for various system parts. This section describes the typographical conventions for the descriptions of configuring elements and attributes. Each subelement is described in two different ways: a pseudo XML structure that shows the hierarchy and includes attributes, and a set of tables that describe each element’s attributes.
Example:
<someElement>
<optionalCollectionElement>
<add optionalAttribute="valueType"
requiredAttribute="valueType" />
...
</optionalCollectionElement>
<optionalElement (obsoleteAttribute="valueType")
optionalAttribute="valueType"
requiredAttribute="valueType" />
<requiredElement (obsoleteAttribute="valueType")
optionalAttribute="valueType"
requiredAttribute="valueType" />
</someElement>
Descriptions of attributes appear in table format; one table for each element.
Example:
Name | Default Value | Description |
---|---|---|
(obsoleteAttribute) | Description of obsoleteAttribute. | |
optionalAttribute | This is the default value | Description of optionalAttribute. |
requiredAttribute | Another default value | Required. Description of requiredAttribute. |
Last updated: Sep 21, 2015