Hi,
As i said, that i am able to update the app.config key value pair from the code.
Below is the code which i just updated. The code worked for me, and solution to the question is as well-
Configuration configuration = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
if (configuration.AppSettings.Settings[key] != null)
{
configuration.AppSettings.Settings.Add("key","value");
}
configuration.Save();
ConfigurationManager.RefreshSection("appSettings");
Thanks for the inputs provided.