Steve <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> Chris R. Timmons wrote:
>> Steve,
>>
>> Config.Create, which does the actual loading of the config
>> data, is never called by either Config or ConnectionStrings.
>>
>
> Config.Create does not need to be called manually. It is called
> when ConfigurationSettings.GetConfig(string) is called,
> dependent on what is configured in the application's config
> file, in the configSections block.
>
> I'm able to watch the code go through the Create routine
> everytime while in the debugger, so that doesn't appear to be
> the problem.
Steve,
Sorry about that. I'm not as well informed about dynamic
configuration properties as I like to think I am :-).
I believe the custom section handler class Config needs to explicitly
declare it is implementing IConfigurationSectionHandler in order for
its Create method to be called. Something like this:
public class Config : IConfigurationSectionHandler
--
Hope this helps.
Chris.
-------------
C.R. Timmons Consulting, Inc.
http://www.crtimmonsinc.com/