Application Settings outside of web.config

Solution 1:

For the appSettings and connectionStrings nodes in web.config you can move these into separate files outside of web.config.

In your web.config you would have:

<appSettings configSource="appsettings.config"></appSettings>

and then a new file appsettings.config:

 <?xml version="1.0"?>
 <appSettings>
     <add key="foo" value="bar" /> 
 </appSettings>

Then you have to make sure that you don't deploy these new files and keep them different on the production server and your dev environment.

All my web.config files are excluded from my deployment process, if I need to change them, I do that on the stage or production sites.