Introduction
This document describes the configuration of the episerver.dataStore
section. Please refer to the Configuration Syntax 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>
<siteDataSettings>
<add siteId="string"
connectionStringName="string"
deadlockRetries="int"
deadlockRetryDelay="timespan"
databaseQueryTimeout="timespan" />
...
</siteDataSettings>
</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.
Name |
Default Value |
Description |
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
Name |
Default Value |
Description |
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.
Name |
Default Value |
Description |
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.
Name |
Default Value |
Description |
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
Name |
Default Value |
Description |
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
Name |
Default Value |
Description |
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. |
<siteDataSettings> and <add> Element Attributes
Name |
Default Value |
Description |
siteId |
|
Required. The site ID (as defined in the episerver.framework configuration section,
see EPiServer Framework SDK) that this database configuration should apply to, or “*” for any site that does not have a specific entry.
|
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). |
deadlockRetries |
5 |
The number of retry attempts in case a deadlock occurs. |
deadlockRetryDelay |
0:0:0.1 |
The time to wait before retrying in case of a deadlock (only relevant if deadlockRetries is greater than 0). |
databaseQueryTimeout |
0:0:30 |
The timeout value to use for all database queries (in other words DbCommand.CommandTimeOut). |
Do you find this information helpful? Please log in to provide feedback.