Can't read Web.config with ConfigurationManager.AppSettings
问题 I have build a WCF service that uses Web.config to get some appSettings. In visual studio it works great but when I publish and instal the service it suddenly gets its appSettings from App.config and not from Web.config. I know this because I loop through appSettings and printed the result to the console with this code: foreach (string key in ConfigurationManager.AppSettings.AllKeys) { Console.WriteLine("Name: {0} Value: {1}", key, ConfigurationManager.AppSettings[key]); } My configs look