+1  A: 

Could be because KeysCollection only implements IEnumerable not IEnumerable<T>. Try using the Cast method on the Keys property first, something like:

var query = from q in System.Web.Configuration.WebConfigurationManager.AppSettings.Keys.Cast<string>()
        where q.StartsWith("Foo")
        select q;
Simon Fox
Yep, looks good.
Pure.Krome
+2  A: 

Try this if you want the values:

var settings = System.Web.Configuration.WebConfigurationManager.AppSettings;

var query = from string q in settings.Keys
            where q.StartsWith("Foo")
            select settings[q];
DSO
Even better :) awesome! thanks :)
Pure.Krome