MVC5 reading Config values without using System.Web
asp.net-mvc, asp.net-mvc-2, asp.net-mvc-3, asp.net-mvc-4, web-config
Solution
It should be:
string key = System.Configuration.ConfigurationManager.AppSettings.Get("AppKey");
OR
string key = System.Configuration.ConfigurationManager.AppSettings["AppKey"];
Problem
I keep reading that the new MVC avoids using System.Web by default as that used to add lots of extra stuff automatically. Does that mean that in order to read the config file now in MVC5, one should use from System.Net instead? Thanks...