private bool ReadBoolean(string name, bool defaultValue)
{
string temp = ConfigurationManager.AppSettings[name];
if (String.IsNullOrEmpty(temp))
return defaultValue;
bool result = false;
if (!Boolean.TryParse(temp, out result))
throw new Exception(String.Format("{0} must be True or False: {1}", name, temp));
return result;
}