How should I handle deploying web applications to multiple servers?
I have a dev, test and prod environment. No build server is available. Developers can't deploy to prod. The people that do deploy to prod copy files from test to prod. They don't have VS installed.
The way it's handled is using web.config transform. However, to deploy to prod involves putting prod code on the test server where it's copied over.
Sometimes simple mistakes are made, such as forgetting to change test back to the right environment after deployment. Or the test config gets moved to prod instead of the prod config.
So the question is, what is the best way to prevent mistakes from happening?
My first thought is let the app determine which server it's on at runtime and use the appropriate settings/connection strings/etc... However, the server names could change in the not too distant future. So if multiple apps are hard coded, that would mean updating all of them. The easiest way to handle that situation would be to place a DLL in the GAC that determines the environment.
Are there any drawbacks or possible complications that this would cause? Or is there a better solution to the problem than this?