ASP.Net - Managing Environment Specific Resources

Soldato
Joined
5 Mar 2003
Posts
10,771
Location
Nottingham
Hi,
Interesting problem that I'm unsure how to manage. Please imagine that I have a full (db and web server) development and production environment. Each of the environments databases are on different servers. The connection string is hardcoded into the web config file.

Now I need to make a change to the web config file and deploy it to the production server. How do you ensure that someone doesn't just make the change and deploy the file (that would be bad, as now the production web site is querying the development database).

Cheers :)
 
Block the Production Website server from being able to contact the development via a firewall, ipsec policy, domains there a loads of ways.
 
You could always add an entry to the hosts file on the production server which points the development server's DNS name at the production database server's IP.

That way even if someone left the connection string pointing to "dev-server" it will still resolve to the right IP.

Although you should really have some kind of procedure/check list of things to do when deploying the new live system so nothing is forgotten.
 
Last edited:
Block the Production Website server from being able to contact the development via a firewall, ipsec policy, domains there a loads of ways.
Thats not the issue I'm trying to solve - I'm after a solid / industrial standard way to control how files are migrated when they contain environment specific values.

Yes your method will stop the problem becoming a bigger one (killing the site rather than letting it get / store data in the dev site), but not exactly what I'm after :)
 
Back
Top Bottom