private static bool GetBooleanConfigValue(string key, bool defaultValue)
{
var result = defaultValue;
var settings = ConfigurationManager.GetSection(PORTALSECTIONKEY) as NameValueCollection;
if (settings != null)
{
var configString = settings[key];
if (!string.IsNullOrEmpty(configString))
{
bool configVal;
if (bool.TryParse(configString, out configVal))
result = configVal;
}
}
return result;
}