Cannot read connection string from web API configuration when debugging in Visual studio 2010
I am writing an ASP.net web API application and this is my first one. I am trying to set up my connection string and retrieve it using the configuration manager. There are three configuration files, web.config, web.debug.config and web.release.config. In each of these files I have added my desired connection string and have removed the default connection strings. But configuration manager still pulls up a default database connection string from someplace. Doing a global search through all the files in the solution there is no indication where configuration manager is reading this default string. How can I get my application to read the connection string that I specify in the configuration files? Why is configuration manager not reading any of these configuration files?
This is the string that I get back from configuration manager that I have no idea where it is getting it: data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true
I am attempting to read the configuration string like this:
string CONNECT_STRING = ConfigurationManager.ConnectionStrings["Jobs"].ConnectionString;