I know how to create custom configuration handlers for my .NET application. There are plenty of posts on StackOverflow that cover what needs to be done. I've spent most of the day knocking out classes that derive from ConfigurationElement.
I'm getting worried that this approach involves a lot of work - more work than I was expecting. I'm creating a lot of classes and decorating them with lots of attributes and I can't help thinking that a lot of this work could be embedded within a framework.
Windows Forms recently gained a feature called Application Settings. This gives you an editor for settings and it creates some code that details with serializing types into and out of config files. Application Settings appears to take a lot of the pain out of dealing with custom config, but I don't particularly like the format of the config sections that this produces and I'm not looking to save my config back.
So, my quesions are:
- Is it appropriate to use the Application Settings mechanism within an ASP.NET site? Will I discover perf/threading issues with this mechanism within such an app?
- Are there other (better) frameworks that take the hard work out of reading custom config from web.config?