You need to declare them with the key and value properties instead, like so:
<appSettings>
<add key="username" value="abcd"/>
<add key="password" value="abcd123"/>
<appSettings/>
If you want the basics, you can access the keys via:
string username = System.Configuration.ConfigurationManager.AppSettings["username"].ToString();
string password = System.Configuration.ConfigurationManager.AppSettings["password"].ToString();
To access my web config keys I always make a static class in my application. It means I can access them wherever I require and I'm not using the strings all over my application (if it changes in the web config I'd have to go through all the occurrences changing them). Here's a sample:
using System.Configuration;
public static class AppSettingsGet
{
public static string Username
{
get { return ConfigurationManager.AppSettings["username"].ToString(); }
}
public static string Password
{
get { return ConfigurationManager.AppSettings["password"].ToString(); }
}
}