Trye to write your appsettings in configuration secton like this
<configuration>
<appSettings>
<add key="web" value="http://URL HERE" />
</appSettings>
</configuration>
Then add the following reference
using System.Configuration;
And finally in your code section you have to write like this,
messenger.Url = ConfigurationManager.AppSettings["web"];