Hierarchical Model Config Store

May 13, 2010 at 6:48 PM


In this post you talk about being able to set up the Hierarchical model. Do you have anymore documentation on how to set this up? Also there is a little information in your readme.txt. Is it possible you could go into a little more detail what you need to do to get more than one config store list set up?


May 16, 2010 at 10:54 PM


The idea is basically that the Config Store Feature is activated in every site collection where you might want to use it - this will provision the list etc. so entries can be added in each site, to suit the configuration required in each area. Then, when a value is requested, if an entry exists in the current site it will be returned, otherwise the entry is returned from the 'master' site (from a URL defined in web.config) - this is the 'hierarchical' aspect. It should also be possible to use the Config Store across multiple web applications in this way.

One thing to look out for is web.config entries being provisioned each time the Feature is activated. There's a Feature property which controls this (this is mentioned in the readme), which you might need to switch to 'False' (and rebuild the WSP/deploy) if it isn't already - I changed my mind on the best default between releases.

Feel free to come back here if you need further help.



P.S. Note that the same code also works fine with just a single Config Store instance.