Nini: Manual: "5.2 Storing configuration data in a database
If you are running an ASP.NET application then you probably have multiple users in each system. You will probably also have a bunch of user settings to edit. Most web applications are entirely configured with a database so the following is an example of using Nini along with your database.
Here's a very simple example with a SQL Server table. This can easily be adapted to any other database. Here is the structure of the database table:
CREATE TABLE UserSettings
The ConfigSettings field stores a Nini configuration value. Now you can load a Nini configuration values like this:
string userId = GetUserId(); // retrieve the user id somehow
SqlCommand command = new SqlCommand('SELECT Settings FROM UserSettings WHERE ID = '
+ userId, connection);
SqlDataReader reader = command.ExecuteReader();
IConfigSource source = new XmlConfigSource(new StringReader(reader.GetString(0)));