Is there a way to automatically publish a website to multiple locations at once?

Our website is load balanced across multiple servers, so when I want to publish I have to do it to each server individually.

Thx, Trev

+4  A: 

Perhaps with some build scripts, such as MSBuild? Or perhaps you could create a script (PowerShell, VBScript, whatever), which copies all contents of a directory, and invoke it in the post build event (configurable in Visual Studio), so that once your solution (or the last project, actually) is built the script will run and copy the output files to wherever you need them.

Pawel Krakowiak
This is what I had done, as well. I published to what was essentially a "drop" folder and had a script to do the pushes to the final locations. It worked and was not too bad, unless you had multiple named configurations.

You could

  1. Publish the content to a UNC and have all of the web servers work off of that UNC
  2. Push the content from your staging/QA server to production using a tool like MSDeploy
  3. Use FRS to replicate the files from a "master" webserver to everyone else.

MSDeploy is setup to handle this using multiple Configurations for each location. Scott Hanselman presented on this at Mix '10