views:

111

answers:

5

I need to tweak some variables (only in a development setting) without having to restart IIS or anything (so I assume Web.Config is the wrong place to put them). Where is the easiest place to put about 500 config settings that have to be read for every request and written to, like I said, while IIS is running?

EDIT: Like I said, this is only for some Q&D development so I don't care about performance in any way. A database is a bit of overkill (and is probably more work than I want to deal with), I want something fast (like Settings), that I don't have to worry about parsing and can read from and write to. If I do XML, where do I write the file to so I don't have to spend time messing around with permissions?

A: 

500 Config Settings to be read for every request? I'd put them in a database so they can be indexed and cached. A separate XML or data file would also most likely be cached in memory by the web server, but still wouldn't provide the performance an indexed database table could. But it depends on how you are accessing the settings.

Gordon Bell
+2  A: 

In a database?

Will
I was just thinking this myself, you beat me to it.
Dana
A: 

You can just make your own "config" file. Just don't name it .config. Then you can read it just like a text file and set all your properties. Just have to either implement your own file monitoring class or something to know the file has changed so you can update your code.

Tom
A: 

With that many configuration options a database system, with some well thought caching is going to most likely be the best idea overall!

You have to be sure to consider the impacts of loading/storing them on all requests as well, as even with small sized values, that can be a big amount of overhead. SO caching is going to be very important.

Mitchel Sellers
A: 

I know you said you don't want a database, but with 500 settings, it just seems like the best solution.

That said, if you really don't want a database, you could always dump them into an xml file stored locally and just read/write when needed.

Dana