October 19, 2006

dotNET Custom Configuration Handlers

So you want to add some configurable content to your application/Web application.
The place for your data is in the configuration file, app.config or web.config.
You could put it in the AppSettings, a small problem with this is it uses Key/Value collections which means that the Keys must be unique, that's not the end of the world but you may want to access a complete section in the config file and sort them or something.
The alternative is to create your own section in the config file. To access this you'll need to create your own Handler Class.
I'll explain the settings in the config file followed by the Handler Class and then how to access it.

Custom Configuration Handlers on ASP.NET Forum

No comments: