Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jason 92 posts 175 karma points
    Sep 04, 2015 @ 16:03
    Jason
    0

    Extracting distributedCall config into an environmental config

    Hello,

    I receive an error:

    Unrecognized attribute 'configSource'. Note that attribute names are case-sensitive.
    

    Am I missing something obvious here..?

    Folder structure:

    Root Folder
    Config
        EnvironmentConfiguration
            DistributedCalls.config
        UmbracoSettings.config  
    web.config   
    

    Web.config

    <umbracoConfiguration>
        <settings configSource="config\umbracoSettings.config" />
    ....
    </umbracoConfiguration>
    

    umbracoSettings.config

    ...
    <distributedCall configSource="EnvironmentConfigurations\DistributedCalls.config" />
    ...
    

    DistributedCalls.config

    <?xml version="1.0"?>
    <!-- Used by umbracoSettings.config --> 
    <distributedCall enable="false">
    

  • Marc Goodson 2155 posts 14406 karma points MVP 9x c-trib
    Sep 04, 2015 @ 20:33
    Marc Goodson
    0

    I think the problem here is that distributedCall isn't defined as a ConfigurationSection and so doesn't have a configSection property, to allow you to specify a seperate file as it's source.

    https://msdn.microsoft.com/en-us/library/system.configuration.sectioninformation.configsource(v=vs.110).aspx

  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Sep 05, 2015 @ 08:23
    Dave Woestenborghs
    0

    I think the goal here is to have different settings for each environment.

    What we do is to create config transforms for the config files and create different publishing profiles for each environment.

    Dave

  • Jason 92 posts 175 karma points
    Sep 05, 2015 @ 09:13
    Jason
    0

    tranforms are something we're looking to introduce shortly, but for this project the deadline is too close.

    Here's an actual snippet..

    web.config

    <umbracoConfiguration>
        <settings configSource="config\umbracoSettings.config" />
        <BaseRestExtensions configSource="config\BaseRestExtensions.config" />
        <FileSystemProviders configSource="config\FileSystemProviders.config" />
        <dashBoard configSource="config\Dashboard.config" />
    </umbracoConfiguration>
    

    umbracoSettings.config

    ...
     <distributedCall configSource="EnvironmentConfigurations\DistributedCalls.config" />
    ...
    
  • Dave Woestenborghs 3504 posts 12134 karma points MVP 9x admin c-trib
    Sep 05, 2015 @ 09:17
    Dave Woestenborghs
    0

    Like Marc pointed out earlier this is not possible at the moment.

    I think config transforms is the only option at the moment.

    Dave

  • Jason 92 posts 175 karma points
    Sep 05, 2015 @ 09:19
    Jason
    0

    We use the same approach with Umbraco 6.2.4, working in production. I'#ll look into that project again.

Please Sign in or register to post replies

Write your reply to:

Draft