{
/// <summary>
/// A configuration section for web.config.
/// </summary>
/// <remarks>
/// In the config section you can specify the provider you
/// want to use for BlogEngine.NET.
/// </remarks>
public class BlogProviderSection : ConfigurationSection
{
/// A collection of registered providers.
/// </summary>
[ConfigurationProperty("providers")]
public ProviderSettingsCollection Providers
{
get { return (ProviderSettingsCollection)base["providers"]; }
}
/// The name of the default provider
/// </summary>
[StringValidator(MinLength = 1)]
[ConfigurationProperty("defaultProvider", DefaultValue = "XmlBlogProvider")]
public string DefaultProvider
{
get { return (string)base["defaultProvider"]; }
set { base["defaultProvider"] = value; }
}
<sectionGroup name="BlogEngine">
<section name="blogProvider" requirePermission="false" type="BlogEngine.Core.Providers.BlogProviderSection, BlogEngine.Core" allowDefinition="MachineToApplication" restartOnExternalChanges="true"/>
</sectionGroup>
</configSections>
<blogProvider defaultProvider="XmlBlogProvider">
<providers>
<add name="XmlBlogProvider" type="BlogEngine.Core.Providers.XmlBlogProvider, BlogEngine.Core"/>
<add name="MSSQLBlogProvider" type="BlogEngine.Core.Providers.MSSQLBlogProvider, BlogEngine.Core"/>
</providers>
</blogProvider>
</BlogEngine>