R – Deploying ASP.NET applications: Push vs. Pull

asp.netdeploymentweb-deployment-project

How do you deploy ASP.NET applications? Do you push it to production servers using UNC paths/mapped drives? FTP? SFTP? SSH/SCP (via 3rd party app installed)? Something else? Or do you pull it from the production servers with a Source control update or other mechanism? Consider the production servers being on the internet or in a DMZ, push requires opening insecure firewall ports (for UNC or FTP) does it not?

I'm trying to solidify my deployment philosophy for ASP.NET. The pieces that my ideal one-click build/deploy process will include are: MSBuild, Web Deployment Projects, CruiseControl.NET. But, I still struggle with how to actually deliver the bits to the production server.

After spending time on both Windows and *nix platforms, I get frustrated with the Windows deployment story and so am curious how others are doing this.

Best Answer

I use cruisecontrol.net and am very happy with it. I have a nant script that cruise control calls which:

  1. Gets the source from our staging SVN branch
  2. Builds it
  3. Copies the files to each production server
  4. Creates a tag in our production branch in svn so we have a snapshot of what was pushed.

Works great! We used to do this all manually a year ago and I can't tell you how much better this is. There is a small learning curve and some upfront script writing. That might take a couple days but you will save much more time in the end.