Mass updating .net web applications
So I have a .net web application that I use the VS 2010 "publish" feature to deploy to a server. Each instance of the application has its own unique connection开发者_开发知识库 string, pointing to its own database.
I have 80 instances of this application. I would like to be able to update 1 instance with a "master" version of the app, and then have the other 79 update themselves, but keep their existing connection string.
What is the most common / standard way of achieving this?
Through the properties of the web.config file (solution explorer) you can set the "Build Action" to "none".
Then deploy the webapp to a local directory. This is now without that web.config file.
Then copy that local directory over your 80 applications. You could maybe automate this step.
There are simple deployment tools that can take care of coping binary packages over multiple servers while maintaining a customized configuration. KwateeSDCM is a free tool that can do this. You can look it up on freshmeat
(I don't seem to able to respond to your comment so I edited my answer) Ken - yeah, the doc is really slim. They've got a video tutorial that is actually a lot more useful and I also got some pointers from one of their developers. Honestly, I don't know that much about asp.net but from what you describe it looks very similar to what I setup with my tomcat web applications (war) on my 30 servers. You define a "package" which is simply a zipped (or tared) archive of the files/executables you have to deploy, configure the target servers and then tell sdcm which package goes on which server. There's a sort of environment variable concept which you can use in your configuration files (in your case, %{connection_string}) has placeholders which get substituted at installation-time with the server-specific values that you specify in your sdcm configuration. With about half a day's work I manage to configure kwateesdcm so that with a single click it connects to each server, stops tomcat, copies over my archives, expands them where I need to, substitutes the server-specific parameters and restarts tomcat to take all changes into account. The cool thing is that sdcm also archives previous archives/configurations so that it's which takes a lot of stress out of updates since I can quickly revert to a previous stable version if my latest stuff had problems. One annoying thing is that it requires an ssh server on each target server. I got over that by installing winsshd on my servers
精彩评论