I have some settings in a web.config file that I want to override when I'm testing the ASP.NET app locally on my machine. The main part looks like this:
<appSettings file="WebAppSettings.config">
<add key="DEBUG" value ="False"/>
<add key="PROD" value="TrueInMainConfigFile"/>
</appSettings>
Now, in my local "WebAppSettings.config" I have:
<appSettings>
<remove key="DEBUG"/>
<remove key="PROD"/>
<add key="DEBUG" value ="True"/>
<add key="PROD" value="False"/>
</appSettings>
I had JUST changed the value of "PROD" from True to False and saved the file. Yet, when I rebuild and run the site (again, on my local machine with IIS, not Cassini), the value of System.Configuration.ConfigurationManager.AppSettings("PROD") still returns "True" instead of "False".
Sometimes letting it "sit for a long time" solves this problem. However, for the most part, I have to close and re-open VS2008 in order to get the new value to 'take'.
What's going on here?