how to loop through web.config and check all items in a section?
Posted on 2008-10-10
i want to test DB connections as sort of a DB health check. i want to have a section in the web config with 6 connection strings called things like DBNewYork, DBCali, DBFlorida... and for a .aspx page to loop over all of them and connect do do some silly select 'true' or something to show the connection worked and DB send a response back.
the ourput of the page should be
[DB name in config1] = true
[DB name in config2] = false
[DB name in config3] = true
this will be nice since to add another DB to check all an admin would do is add a config item and save the new file.