This content is archived. See latest version here.

Last updated: Jul 09 2014

This document describes the configuration of the episerver.dataStore section. Refer to the Configuration section for an explanation of the syntax used in the description of the configuration elements.

<episerver.dataStore>

XML
<episerver.dataStore>
   <dataStore autoRemapStores="bool"
              autoResolveTypes="bool"
              defaultProvider="string"
              deleteAllOperationTimeout="int" >
      <cache defaultProvider="string">
         <providers>
            <add description="string"
                 name="string"
                 type="string" />
            ...
         </providers>
      </cache>
      <providers>
         <add description="string"
              name="string"
              type="string" />
         ...
      </providers>
   </dataStore>
   <entity>
      <providers>
         <add name="string"
              type="string" />
         ...
      </providers>
      <supportedTypes>
         <add provider="string"
              type="string" />
         ...
      </supportedTypes>
   </entity>
   <dataSettings>
           connectionStringName="string"
           retries="int"
           retryDelay="timespan"
           databaseQueryTimeout="timespan" />
</episerver.dataStore>

<dataStore> Element Attributes

The dataStore element is optional. Default configuration values as below are set in code, these values will be overriden if other values are specified in the web.config file.
NameDefault ValueDescription
autoRemapStores true Defines if stores should be automatically remapped when a type definition changes.
autoResolveTypes true Defines if type resolution should be done automatically by the Dynamic Data Store.
defaultProvider EPiServerSQLServerDataStoreProvider The name of the default provider. A provider with the specified name must exist in the providers collection.
deleteAllOperationTimeout 600 Command timeout for the “delete all” functionality.

The values for the episerver.dataStore section have defaults defined in code equivalent to the following:

XML
<episerver.dataStore>
  <dataStore defaultProvider="EPiServerSQLServerDataStoreProvider">
    <providers>
      <add name="EPiServerSQLServerDataStoreProvider" description="SQL Server implementation of Data Store" type="EPiServer.Data.Dynamic.Providers.SqlServerDataStoreProvider, EPiServer.Data" />
    </providers>
    <cache defaultProvider="httpCacheProvider">
      <providers>
        <add name="httpCacheProvider" description="Http Cache implementation for DataStore" type="EPiServer.Data.Cache.HttpRuntimeCacheProvider,EPiServer.Data.Cache" />
        <add name="nullCacheProvider" description="Null Cache implementation for DataStore" type="EPiServer.Data.Cache.NullCacheProvider,EPiServer.Data" />
      </providers>
    </cache>
  </dataStore>
</episerver.dataStore>

In the event you want to change these defaults, you just need to specifiy the overriden values. The configuration specified in the file is merged with the default in code. As with the Microsoft standard, providers added in the providers element are merged with the defaults. To completely replace the defaults, add the <clear /> element as the first element in the providers collection.

<cache> Element Attributes

NameDefault ValueDescription
defaultProvider httpCacheProvider The name of the default cache provider. A provider with the specified name must exist in the cache/providers collection.

<cache> and <providers> and <add> Element Attributes

The httpCacheProvider (EPiServer.Data.Cache.HttpRuntimeCacheProvider) and nullCacheProvider (EPiServer.Data.Cache.NullCacheProvider) providers are automatically added to the providers collection. To remove one or more of these, use the standard <remove> and <clear> elements.
NameDefault ValueDescription
description   Short text describing in the provider.
name   Required. Unique name for this provider.
type   Required. The full name of the data store cache provider class. The referenced class must inherit from EPiServer.Data.Cache.CacheProvider.

<providers> and <add> Element Attributes

The EPiServerSQLServerDataStoreProvider (EPiServer.Data.Dynamic.Providers.SqlServerDataStoreProvider) provider is automatically added to the providers collection. To remove one or more of these, use the standard <remove> and <clear> elements.
NameDefault ValueDescription
description   Short text describing in the provider.
name   Required. Unique name for this provider.
type   Required. The full name of the data store provider class. The referenced class must inherit from EPiServer.Data.Dynamic.Providers.DataStoreProvider.

<entity> and <providers> and <add> Element Attributes

NameDefault ValueDescription
name   Required. Unique name for this entity provider.
type   Required. The full name of the entity provider class. The referenced class must implement EPiServer.Data.Entity.IEntityProvider.

<entity> and <supported> and <add> Element Attributes

NameDefault ValueDescription

provider

 

Required. The unique name of the entity provider that should handle this entity class. (As defined in the providers list.)

type   Required. The full name of the entity class to be registered with the specified provider. The referenced class must implement EPiServer.Data.Entity.IEntity.

<dataSettings>

NameDefault ValueDescription
connectionStringName EPiServerDB The identifying name for the connection string that should be used. A connection string with the specified name must exist in the connectionStrings section (ConnectionStrings.config).
retries 5 The number of retry attempts in case a transient error such as a deadlock occurs or a timeout when opening the connection.
retryDelay 0:0:0.1 The time to wait before retrying in case of a transient error (only relevant if retries is greater than 0). Retry delays are using a exponential backoff based on the delay with a minimum of 10ms and a maximum of 10s.
databaseQueryTimeout 0:0:30 The timeout value to use for all database queries (in other words DbCommand.CommandTimeOut).

Comments