One of the things that I set up wherever I go is a separate QA environment. This is distinct from development and distinct from production. It's a place where QA can install, test, uninstall, reinstall, upgrade, destroy, and recreate at will.
One of the consequences of maintaining a QA environment is the need to make configuration changes as you get into that environment. While this is sometimes time consuming and obnoxious, it's a preview of what will happen when you release, so it's something that has to be done. The number one thing to make this successful is to isolate your config changes into something you can manage. If everything's in one place you're far less likely to make a mistake, and if you do it's a lot easier to find your mistake.
Where To Put Configuration Settings:
Depending on your application, you could put this one configuration in several places: a database table, a config file, or the web.config or machine.config that is already in your web server.
Where NOT To Put Configuration Settings:
Do not make this one place your code! Particularly if you're using compiled code, decompiling or building different versions of code for each environment will slow you down. One config change and you're deploying a whole new build.
So, the lesson of this post:
It's not quite a cardinal rule, but for ease of deployment (and your own sanity!), put all your configuration in one place.