Last post Sep 28, 2007 04:06 PM by cnelson1
Sep 28, 2007 04:06 PM|cnelson1|LINK
I am having a problem. I am trying to use the configuration replacement feature of Wed Deployment Project with a custom configuration section. I have something like the following:
I have the following class:
which contains code similar to the following:
I also have a SpecialStuff class similar to this:
Now, if I add this to the section replacement:
everything works fine.
However, if I attempt to replace a section inside a section, like this:
I get the following error:
Error 126 web.config(1): error WDP00002: missing section applicationSettings/specialStuff.
and if I try to refer to specialStuff by itself, like this:
type="MyConfig.Configuration.SpecialStuffSection, MyConfig.Configuration, Version=188.8.131.52, Culture=neutral, PublicKeyToken=1234567890123456">
and use this in the deployment project:
I get this error:
Error 127 An error occurred creating the configuration section handler for specialStuff: Type MyConfig.Configuration.SpecialStuffSection' does not inherit from 'System.Configuration.IConfigurationSectionHandler'. (C:\xxxx\Debug\web.config line 9)
which seems really strange, since IConfigurationSectionHandler is supposed to be deprecated in .NET 2.0.
Of course, it makes sense that this second try wouldn't work, because specialStuff isn't grouped inside applicationSettings. But that can't be done, because applicationSettings is a ConfigurationSection, not a ConfigurationSectionGroup.
So I am at a loss here....
wdp Web Deployment Project Custom Configuration ConfigurationSection ConfigurationSectionGroup