Class Settings
Holds the instances of all Site Settings configurations which are in the WebConfig file.
Inherited Members
Namespace: EPiServer.Configuration
Assembly: EPiServer.Configuration.dll
Version: 8.11.0Syntax
[ServiceConfiguration(FactoryMember = "Instance")]
public class Settings : ConfigurationElementBase
Remarks
The Settings class contains information about site settings configuration. This includes the current instance of site settings configuration via (Instance) and all sites settings configuration via (ALL).
The Settings class has the fallback host, which is indicates with "*" in the web.config file for an enterprise solution.
Constructors
Settings()
Initializes a new instance of the Settings class.
Declaration
public Settings()
Properties
All
Gets an
Declaration
[Obsolete("Sites are not defined in configuration anymore. Use SiteDefinitionRepository to get list of sites.")]
public static IDictionary<string, Settings> All { get; protected set; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IDictionary<System.String, Settings> |
AutoSaveInterval
Gets or sets the auto save interval. If the value is less than 10 seconds, the auto save feature will be turned off.
Declaration
[TimeSpanValidator]
[Obsolete("The legacy edit mode has been removed")]
public TimeSpan AutoSaveInterval { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The auto save interval. |
BackgroundCopyThreshold
Gets or sets the background copy threshold. If a copy operation is requested with a larger number of pages than threshold then the copy is performed in a background thread.
Declaration
public int BackgroundCopyThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The background copy threshold. |
ConnectionStringName
Gets or sets the name of the connection string.
Declaration
[Obsolete("The connection string is managed by configuration in EPiServer.Data")]
public string ConnectionStringName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The name of the connection string. |
ContentVersionCacheSlidingExpiration
The sliding cache for how long a content version is cached. Set to "0:0:0" to disable.
Declaration
[TimeSpanValidator]
public TimeSpan ContentVersionCacheSlidingExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
DatabaseQueryTimeout
Gets or sets the database query timeout.
Declaration
[Obsolete("Database settings is managed by configuration in EPiServer.Data")]
[TimeSpanValidator]
public TimeSpan DatabaseQueryTimeout { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The timeout value. |
DeadlockRetries
Gets or sets the number of retry attempts when a database deadlock occurs.
Declaration
[Obsolete("Database settings is managed by configuration in EPiServer.Data")]
public int DeadlockRetries { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 | The number of retries retries. |
Remarks
Deadlocks will usually not occur, but during special circumstances you may experience deadlocks. This could for example happen if pages are created and published very frequently (>10 pages per second).
DeadlockRetryDelay
Gets or sets the deadlock retry delay.
Declaration
[Obsolete("Database settings is managed by configuration in EPiServer.Data")]
[TimeSpanValidator]
public TimeSpan DeadlockRetryDelay { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The data access retry delay. |
DisableVersionDeletion
Defines if the user interface should disable tools to increase traceability.
Declaration
[BoolValidator]
public bool DisableVersionDeletion { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
DraftRetainPeriod
Gets or sets the retain period for the draft created by the autosave functionality.
Declaration
[TimeSpanValidator]
[Obsolete("The legacy edit mode has been removed")]
public TimeSpan DraftRetainPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The draft retain period. |
EnableModelSyncCommit
Set to false to disable the commit phase when synchronizing typed models. Block types and page types will not be updated automatically.
Declaration
[BoolValidator]
public bool EnableModelSyncCommit { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnablePerformanceCounters
Defines if performance counter data should be collected.
Declaration
[BoolValidator]
public bool EnablePerformanceCounters { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableSavingOfConfigurationToDatabase
Gets or sets a value indicating whether the configuration should be saved to database.
Declaration
[BoolValidator]
public bool EnableSavingOfConfigurationToDatabase { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Remarks
The mirroring service requires that the configruation is saved to database and therefore if the site is to be mirrored to or from the setting must be set to true.
EnableScheduler
Set to false to disable EPiServer's connection with the scheduler. Default value (if the tag does not exist) is true.
Declaration
[BoolValidator]
public bool EnableScheduler { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
EnableXmlRpcHeader
Defines whether xmlrpc headers should be added to page output.
Declaration
[BoolValidator]
[Obsolete("Used by the blog API that is not longer shipped with the product")]
public bool EnableXmlRpcHeader { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
ErrorMailHandler
Gets or sets the error mail handler.
Declaration
[Obsolete("Built-in functionality to send e-mail's on exceptions has been removed")]
[CustomRegexStringValidator("^(?:~/|/)(?:[a-zA-Z0-9\\-_\\.!\\~\\*'\\(\\):@&=\\+\\$,]+/)*", "The value must be a relative adress, ie it must start with a slash or tilde-slash.")]
public string ErrorMailHandler { get; set; }
Property Value
Type | Description |
---|---|
System.String | The error mail handler. |
ExpirationNotificationPeriod
The amount of time before a contents expiration date that the expiration warning should become visible.
Declaration
[TimeSpanValidator]
public TimeSpan ExpirationNotificationPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
FallbackSettings
Declaration
[Obsolete("There is only one Settings which is available through 'Instance'")]
public static Settings FallbackSettings { get; set; }
Property Value
Type | Description |
---|---|
Settings |
GlobalBlockFolderId
ID of the global block folder that is shared between sites.
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public int GlobalBlockFolderId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
GlobalErrorHandling
Set whether you want to use EPiServer's error handling.
Declaration
public string GlobalErrorHandling { get; set; }
Property Value
Type | Description |
---|---|
System.String |
GlobalErrorMail
E-mail address that error messages should be sent to
Declaration
[MailAddressValidator]
[Obsolete("Built-in functionality to send e-mail's on exceptions has been removed")]
public MailAddress GlobalErrorMail { get; set; }
Property Value
Type | Description |
---|---|
System.Net.Mail.MailAddress |
GoogleMapsApiV3Url
Gets or sets the URL for Google Maps API v3
Declaration
public string GoogleMapsApiV3Url { get; set; }
Property Value
Type | Description |
---|---|
System.String | The URL for Google Maps API v3, possibly site-specific. |
HttpCacheability
Value to set the HttpCacheability enumeration for the cach.
Declaration
public HttpCacheability HttpCacheability { get; set; }
Property Value
Type | Description |
---|---|
System.Web.HttpCacheability |
HttpCacheExpiration
Value to set the number of seconds a page should be cached.
Declaration
[TimeSpanValidator]
public TimeSpan HttpCacheExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
HttpCacheVaryByCustom
Specifies a custom text string to vary cached output responses by. Passed to Response.Cache.SetVaryByCustom.
Declaration
public string HttpCacheVaryByCustom { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HttpCacheVaryByParams
The parameters to the page (i.e. querystring) that the cache should vary by. Forwarded to Response.Cache.SetVaryByParams.
Declaration
public string[] HttpCacheVaryByParams { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
IISHiddenSegments
Defines IIS' hidden segments in comma separated format.
Declaration
public string IISHiddenSegments { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IndexingDelayAfterPublish
Delay time between publish and indexing.
Declaration
[TimeSpanValidator]
[Obsolete("Indexing is done by EPiServer Search or Find")]
public TimeSpan IndexingDelayAfterPublish { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
IndexingTextEnabled
If indexing of text into keywords should be enabled.
Declaration
[BoolValidator]
[Obsolete("Enabling indexing is controlled by SearchSettings.Config.Active. Can be changed by the 'active' attribute on the 'episerver.search' section of the config.", false)]
public bool IndexingTextEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IndexingTextRegExp
The regular expression to index words in pages.
Declaration
[Obsolete("This setting is no longer used since an dedicated search engine is used for indexing content")]
public string IndexingTextRegExp { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Instance
Get the current configuration settings.
Declaration
public static Settings Instance { get; set; }
Property Value
Type | Description |
---|---|
Settings |
MaxContentsPerDatabaseRequest
Gets or sets the number of contents when contents requested from database.
Declaration
public int MaxContentsPerDatabaseRequest { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MirroringMonitoringMaxDataPerJob
Declaration
public int MirroringMonitoringMaxDataPerJob { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MirroringSource
The endpoint to use when communicating with mirroring server
Declaration
public string MirroringSource { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MonitoredTaskTruncateLimit
NOTE: This is a pre-release API that is UNSTABLE and might not satisfy the compatibility requirements as denoted by its associated normal version. The amount of time before a monitored task will be removed.
Declaration
[TimeSpanValidator]
public TimeSpan MonitoredTaskTruncateLimit { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
OperationCompatibility
Gets or sets the operation compatibility. Default value is None.
Declaration
public EPiServerCompatibility OperationCompatibility { get; set; }
Property Value
Type | Description |
---|---|
EPiServerCompatibility | The operation compatibility. |
Remarks
See EPiServerCompatibility for details on the individual values.
PageCacheSlidingExpiration
The page cache interval (in hours) for the local database. Set to "0" to disable.
Declaration
[TimeSpanValidator]
public TimeSpan PageCacheSlidingExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
PageFolderVirtualPathProviderName
Name for the VirtualPathProvider that is responsible for handling of page folders
Declaration
[CustomRegexStringValidator("^[a-zA-Z0-9]{1,255}$", "The string must be a combination of alphanumericals, dots (.) and dashes (-) up to 256 characters long, e.g. 'site.com' or 'MySite-2'.")]
public string PageFolderVirtualPathProviderName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
PageOfficeStartId
Defines from where the Office plug-in should display the site tree
Declaration
[Obsolete("This setting is not being used anymore due to removal of the legacy office integration")]
public int PageOfficeStartId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageRootId
ID of the root folder
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public int PageRootId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageStartId
ID of the Web page that serves as the start page for the site.
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public int PageStartId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PageUseBrowserLanguagePreferences
Determines if the browser language should define which language is used
Declaration
[BoolValidator]
public bool PageUseBrowserLanguagePreferences { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PageValidateTemplate
Sets if the current template has to match the page type template
Declaration
[BoolValidator]
public bool PageValidateTemplate { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PageWastebasketId
ID of the Recycle Bin.
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public int PageWastebasketId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Parent
Gets or sets the parent.
Declaration
[Obsolete("Sites are not defined in configuration anymore. Use SiteDefinitionRepository to define sites.")]
public SiteElement Parent { get; }
Property Value
Type | Description |
---|---|
SiteElement | The parent. |
PermanentEditRetainPeriod
Gets or sets the retain period for the page's "permanent edit" status.
Declaration
[TimeSpanValidator]
public TimeSpan PermanentEditRetainPeriod { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan | The retain period. |
RemoteCacheListenerShortNames
A list of remote sites that will recieve notifications when a change is made
Declaration
[Obsolete("Not used anymore, was part of older events system")]
public string[] RemoteCacheListenerShortNames { get; set; }
Property Value
Type | Description |
---|---|
System.String[] |
RemoteInvalidateVersionChanges
Set to true to force remote invalidation of cache of specific versions. This is can be used when there are load balanced editor servers and changes to a specific version should be immediately seen. Otherwise it is controlled by ContentVersionCacheSlidingExpiration.
Declaration
[BoolValidator]
public bool RemoteInvalidateVersionChanges { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
RemotePageCacheSlidingExpiration
The page cache intervals (in hours) for remote sites. Set to "0" to disable.
Declaration
[TimeSpanValidator]
public TimeSpan RemotePageCacheSlidingExpiration { get; set; }
Property Value
Type | Description |
---|---|
System.TimeSpan |
RemoteWebServiceCulture
Set the System.Threading.Thread.CurrentThread.CurrentCulture if handling pages remote.
Declaration
public int RemoteWebServiceCulture { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
RootPageResolver
Gets or sets the root page resolver.
Declaration
public Func<int> RootPageResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Int32> | The root page resolver. |
Remarks
This should not be used it is used to keep backward compability for PageRootId.
SgmlParserDecodeCharEntities
Defines whether SgmlParser should decode character entities (like " ") or not.
Declaration
[BoolValidator]
public bool SgmlParserDecodeCharEntities { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SiteBlockFolderId
ID of the site block folder that holds site specific blocks.
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public int SiteBlockFolderId { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SiteDisplayName
The name of the site. RegExp Pattern for validation: "^([\x20\w0-9.-]{0,256})$".
Declaration
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
[CustomRegexStringValidator("^([\\x20\\w0-9\\.-]{0,256})$", "The string must be either an empty string or any combination of alphanumericals, dots (.), dashes (-) and spaces up to 256 characters long, e.g. 'site.com' or 'My Site-2'.")]
public string SiteDisplayName { get; set; }
Property Value
Type | Description |
---|---|
System.String | The display name of the site. |
SiteUrl
Gets or sets the site URL. It must be a Web URL, and include the path to the site root. It is only to be used to generate direct references to the site in external locations. For references from a page, use root-relative URLs and ResolveUrl etc as appropriate.
Declaration
[WebUrlValidator]
[Obsolete("Use EPiServer.Web.SiteDefinition instead")]
public Uri SiteUrl { get; set; }
Property Value
Type | Description |
---|---|
System.Uri | The site URL. Guaranteed to end with a '/'. |
SiteUrlResolver
Gets or sets the SiteUrl resolver.
Declaration
public Func<Uri> SiteUrlResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Uri> | The SiteUrl resolver. |
Remarks
This should not be used it is used to keep backward compability for SiteUrl.
StartPageResolver
Gets or sets the start page resolver.
Declaration
public Func<int> StartPageResolver { get; set; }
Property Value
Type | Description |
---|---|
System.Func<System.Int32> | The start page resolver. |
Remarks
This should not be used it is used to keep backward compability for PageStartId.
StrictLanguageRouting
Defines if strict language determination should be used during routing.
Declaration
[BoolValidator]
public bool StrictLanguageRouting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
StringCompressionThreshold
Set to the number of characters when compression should be activated.
Declaration
public int StringCompressionThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
StringDelayedLoadThreshold
Set to the number of characters when delayed loading should be activated for large strings in properties deriving from Long String.
Declaration
public int StringDelayedLoadThreshold { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SubscriptionHandler
Defines which class should handle mail
Declaration
public string SubscriptionHandler { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIDefaultPanelTab
The index of the EditPanel tab that is to be shown by default when clicking a page in the edit mode page tree.
Declaration
[Obsolete("The legacy edit mode has been removed")]
public int UIDefaultPanelTab { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remarks
The value of this property is used as an zero-based index in an array of EditPanel tabs. For example, all pages in a default installation of the example will have the following tabs:
Tab name Index View 0 Edit 1 Version list 2
UIDefaultValueForSetChangedOnPublish
Defines what the default state the "Update modified date" check box should be in when editing a page.
Declaration
[BoolValidator]
public bool UIDefaultValueForSetChangedOnPublish { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UIEditorColors
Defines what colors should be available for the editors
Declaration
[Obsolete("Only used by legacy CMS 5 editor")]
public string UIEditorColors { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIEditorCssPaths
Defines which css file to use when rendering the editor. Reg exp pattern for validation is "^/[\w/.-]{1,256}".
Declaration
[CustomRegexStringValidator("^[\\s]*$|^(?:(?:~/|/)(?:[a-zA-Z0-9\\-_\\.!\\~\\*'\\(\\):@&=\\+\\$,]+/)*\\w+[\\.\\-\\w]+\\w+[\\s]*,[\\s]*)*(?:(?:~/|/)(?:[a-zA-Z0-9\\-_\\.!\\~\\*'\\(\\):@&=\\+\\$,]+/)*\\w+[\\.\\-\\w]+\\w+){1}[\\s]*$", "The string must contain one or more comma-separated application- or host-relative virtual file paths, e.g. '~/folder/some.file, /another.file'.")]
public string UIEditorCssPaths { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIEditorUnformattingPersistedTags
Controls which html tags that should not be preserved in "Remove format" action in editor.
Declaration
[Obsolete("Only used by legacy CMS 5 editor")]
[CustomRegexStringValidator("^([a-z]|[A-Z])+(\\|([a-z]|[A-Z])+)*$", "string should be a '|' separated string of html tags")]
public string UIEditorUnformattingPersistedTags { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIImageTransparencyReplacement
The color that should replace the transparent color in a picture compression.
Declaration
[Obsolete]
[ColorValidator]
public Color UIImageTransparencyReplacement { get; set; }
Property Value
Type | Description |
---|---|
System.Drawing.Color |
UIKeepUserLoggedOn
Sets if the current windows authenticated user must reauthenticate after session timeout.
Declaration
[BoolValidator]
public bool UIKeepUserLoggedOn { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UIMaxVersions
The maximum number of page versions that EPiServer will retain.
Declaration
public int UIMaxVersions { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
UIOptimizeTreeForSpeed
Sets if page tree controls should evaluate if tree nodes have children.
Declaration
[BoolValidator]
public bool UIOptimizeTreeForSpeed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Default value is false. If set to true, tree controls will not evaluate if a node has children when it becomes visible. Only nodes that have children will display an expand icon ([+]), which means [+]NodeName. If set to true, tree controls will not evaluate if a node has children when it becomes visible. Thus all nodes will display an expand icon, regardless if it has children or not. This behavior will increase performance when displaying large tree structures.
UISafeHtmlTags
Set which tags should not be encoded.
Declaration
public string UISafeHtmlTags { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIShowGlobalizationUserInterface
Defines if the globalization module should be used
Declaration
[BoolValidator]
public bool UIShowGlobalizationUserInterface { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UITheme
Setting for what graphical theme should be used.
Declaration
public string UITheme { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UIUrl
Gets or sets the URL to the relocateable UI folder. It must be a Web URL, and may include scheme and port. It must be a Web URL, and include the path to the site root. It is only to be used to generate direct references to the site in external locations. For references from a page, use root-relative URLs and ResolveUrl etc as appropriate.
Declaration
[UrlValidator]
public Uri UIUrl { get; set; }
Property Value
Type | Description |
---|---|
System.Uri | The "UI" URL. Guaranteed to end with a '/'. |
UrlPreventRewriteAttrebute
For internal use, do not use. Defines the HTML attribute name that is used by the CMS 5 legacy editor when writing / parsing content
Declaration
public string UrlPreventRewriteAttrebute { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UrlRebaseKind
Defines the type of rebasing to do for links when using Friendly URLs
Declaration
public string UrlRebaseKind { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UrlRewriteExtension
Defines an extension that is mapped to ASP.NET for the URL
Declaration
public string UrlRewriteExtension { get; set; }
Property Value
Type | Description |
---|---|
System.String |
UseLegacyEditMode
Gets or sets the useLegacyEditMode for determining which edit mode is set to run
Declaration
[Obsolete("The legacy edit mode has been removed")]
public bool UseLegacyEditMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The value of useLegacyEditMode key. |
UseLegacyFileManagerMode
Gets or sets the useLegacyFileManagerMode for determining which file manager is set to run
Declaration
public bool UseLegacyFileManagerMode { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UseLegacyShortcutRouting
Gets or sets the useLegacyShortcutRouting that determines how request for pages with a shortcut should be handled. If value is true then the request will be redirected to the page it shorcuts to. If setting is false no redirection is done while data is fetched from shortcut page.
Declaration
public bool UseLegacyShortcutRouting { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
UseStartPublishForDelayedPublishUntil
Set to false to disable the use of the start publish field to store the date the publishing of a content item should be delayed until.
Declaration
[BoolValidator]
public bool UseStartPublishForDelayedPublishUntil { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This member supports the EPiServer infrastructure and is not intended to be used directly from your code.
UtilUrl
Gets or sets the URL to the relocateable Util folder. It must be a Web URL, and may include scheme and port. It must be a Web URL, and include the path to the site root. It is only to be used to generate direct references to the site in external locations. For references from a page, use root-relative URLs and ResolveUrl etc as appropriate.
Declaration
[UrlValidator]
public Uri UtilUrl { get; set; }
Property Value
Type | Description |
---|---|
System.Uri | The "Util" URL. Guaranteed to end with a '/'. |
Version
Gets the version of this configuration.
Declaration
public string Version { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
CopyValues(Settings, Settings)
Copies all values from one Settings instance to another instance.iisreset.
Declaration
public static void CopyValues(Settings source, Settings target)
Parameters
Type | Name | Description |
---|---|---|
Settings | source | |
Settings | target |
InitializeAllSettings()
Sets up all static variables of the Settings class based on the web.config file in the applications root directory.
Declaration
[Obsolete("This method does nothing since configuration is always loaded when required")]
public static void InitializeAllSettings()
InitializeAllSettings(Configuration)
Sets up all static variables of the Settings class based on System.Configuration.Configuration object passed as a parameter.
Declaration
[Obsolete("Use ConfigurationSource.Instance = new FileConfigurationSource(value) to replace global configuration or use GlobalConfigurationManager to Load and Save configuration files")]
public static void InitializeAllSettings(Configuration config)
Parameters
Type | Name | Description |
---|---|---|
System.Configuration.Configuration | config | The System.Configuration.Configuration object that contains the EPiServer settings. |
Exceptions
Type | Condition |
---|---|
System.Configuration.ConfigurationErrorsException | If there is an enterprise solution and the siteHosts section is missing with the value "*". |
MapHostToSettings(String, Boolean)
Maps a host name to a Settings instance.
Declaration
[Obsolete("Use Settings.Instance to get common settings for sites or SiteDefinitionResolver to get site specific settings.")]
public static Settings MapHostToSettings(string hostName, bool fallback)
Parameters
Type | Name | Description |
---|---|---|
System.String | hostName | The host name. |
System.Boolean | fallback | Specifies whether to use a fallback settings instance or not. |
Returns
Type | Description |
---|---|
Settings | A Settings instance with configuration information to handle this request. |
Remarks
This is used for enterprise solutions where you have multiple <settings> sections in the same web.config file.
MapUrlToSettings(Uri)
Maps URL to a Settings instance.
Declaration
[Obsolete("To get 'common' Settings for sites use Settings.Instance. To get site specific settings use EPiServer.Web.SiteDefinitionResolver or EPiServer.Web.SiteDefinitionRepository")]
public static Settings MapUrlToSettings(Uri url)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | url | The URL. |
Returns
Type | Description |
---|---|
Settings |
Remarks
This is used for enterprise solutions where you have multiple <settings> sections in the same web.config file. If the host name that is safe to use for DNS resolution does not exist, then it maps to fallback host which is indicates with "*".
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | Thrown ArgumentNullException if the URI is null. |
System.ArgumentException | Thrown ArgumentException if the URI is not absolute. |
System.Configuration.ConfigurationErrorsException | If the URI absolute path is not equal with the site settings absolute path. Hits when the URI has a path that is outside of the application root. |
Save()
Save method for the web.config file.
Declaration
[Obsolete("Use GlobalConfigurationManager.Load and Save to make changes to the configuration file")]
public void Save()
Save(RestartMode)
Saves the configuration file.
Declaration
[Obsolete("Use GlobalConfigurationManager.Load and Save to make changes to the configuration file")]
public void Save(RestartMode mode)
Parameters
Type | Name | Description |
---|---|---|
RestartMode | mode |
ValidateRuntimeSettings()
Validates all settings consistency and with the runtime.
Declaration
public void ValidateRuntimeSettings()
Remarks
It's ok to call frequently. It will only validate when there's a valid HtppContext and a Control handling the request, and it will only validate once.