Configuration myDllConfig =
ConfigurationManager.OpenExeConfiguration(this.GetType().Assembly.Location);
// Get the appSettings section
AppSettingsSection myDllConfigAppSettings =
(AppSettingsSection)myDllConfig.GetSection("appSettings");
string connString = myDllConfigAppSettings.Settings["SQLConnString"].Value;