Unplanned
Last Updated: 11 Jun 2021 09:06 by ADMIN
ADMIN
Vessy
Created on: 04 Oct 2017 15:57
Category: UI for ASP.NET AJAX
Type: Feature Request
4
Add ability to define telerik specific ConfigSectionHandler in web.config
Add ability to define Telerik specific ConfigSectionHandler for their settings like others (e.g.,log4Net) do.

This makes configuring environments much easier. All I need to do is point to *.Dev.config, *.Stage.config and my application is ready for the new environment.


For example, the following settings:

<configuration>
  <configSections>
    <section name="myConfigSection" type="CurrentApp.ConfigurationSectionHandler, Current" />
  </configSections>
  <myConfigSettings configSource="App_Data\Configs\MyConfigSection.config" />
  <appSettings>
    <add key="Environment" value="Local.Local"/>
...
    <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.ScriptManager.TelerikCdn.BaseSecureUrl" value="https://yourSite.com/cdn/TelerikScripts" />
    <add key="Telerik.ScriptManager.TelerikCdn.BaseUrl" value="http://yourSite.com/cdn/TelerikScripts" />
    <add key="Telerik.ScriptManager.TelerikCdn.CombinedScript" value="Enabled" />
    <add key="Telerik.Skin" value="Bootstrap" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseSecureUrl" value="https://yourSite.com/cdn/TelerikSkins" />
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseUrl" value="http://yourSite.com/cdn/TelerikSkins" />
    <add key="Telerik.StyleSheetManager.TelerikCdn.CombinedResource" value="Disabled" />
    <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Content/; ~/" />
...
  <appSettings>
<configuration>


can be changed to:

<configuration>
  <configSections>
    <section name="telerikSettings" type="Telerik.ConfigurationSectionHandler, Telerik" />
  </configSections>
  <appSettings configSource="App_Data\Configs\Local.config" />
  <telerikSettings> <!-- This section does not exist and the keys are currently inside the local.config file -->
    <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.ScriptManager.TelerikCdn.BaseSecureUrl" value="https://yourSite.com/cdn/TelerikScripts" />
    <add key="Telerik.ScriptManager.TelerikCdn.BaseUrl" value="http://yourSite.com/cdn/TelerikScripts" />
    <add key="Telerik.ScriptManager.TelerikCdn.CombinedScript" value="Enabled" />
    <add key="Telerik.Skin" value="Bootstrap" />
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseSecureUrl" value="https://yourSite.com/cdn/TelerikSkins" />
    <add key="Telerik.StyleSheetManager.TelerikCdn.BaseUrl" value="http://yourSite.com/cdn/TelerikSkins" />
    <add key="Telerik.StyleSheetManager.TelerikCdn.CombinedResource" value="Disabled" />
    <add key="Telerik.Web.UI.StyleSheetFolders" value="~/Content/; ~/" />
  </telerikSettings>
...
</configuration>


or directly point to external configuration file:

<configuration>
  <configSections>
    <section name="telerikSettings"
             type="Telerik.ConfigurationSectionHandler, Telerik" />
  </configSections>
  <appSettings configSource="App_Data\Configs\Local.config" />
  <telerikSettings configSource="App_Data\Configs\Telerik.config" />
...
</configuration>


0 comments