How to avoid chaotic ASP.NET web application deployment?

Posted by emzero on Stack Overflow See other posts from Stack Overflow or by emzero
Published on 2010-04-27T20:51:20Z Indexed on 2010/04/27 20:53 UTC
Read the original article Hit count: 341

Ok, so here's the thing.

I'm developing an existing (it started being an ASP classic app, so you can imagine :P) web application under ASP.NET 4.0 and SQLServer 2005. We are 4 developers using local instances of SQL Server 2005 Express, having the source-code and the Visual Studio database project

This webapp has several "universes" (that's how we call it). Every universe has its own database (currently on the same server) but they all share the same schema (tables, sprocs, etc) and the same source/site code.

So manually deploying is really annoying, because I have to deploy the source code and then run the sql scripts manually on each database. I know that manual deploying can cause problems, so I'm looking for a way of automating it.

We've recently created a Visual Studio Database Project to manage the schema and generate the diff-schema scripts with different targets.

I don't have idea how to put the pieces together

I would like to:

  1. Have a way to make a "sync" deploy to a target server (thanksfully I have full RDC access to the servers so I can install things if required). With "sync" deploy I mean that I don't want to fully deploy the whole application, because it has lots of files and I just want to deploy those new or changed.
  2. Generate diff-sql update scripts for every database target and combine it to just 1 script. For this I should have some list of the databases names somewhere.
  3. Copy the site files and executing the generated sql script in an easy and automated way.

I've read about MSBuild, MS WebDeploy, NAnt, etc. But I don't really know where to start and I really want to get rid of this manual deploy.

If there is a better and easier way of doing it than what I enumerated, I'll be pleased to read your option.

I know this is not a very specific question but I've googled a lot about it and it seems I cannot figure out how to do it. I've never used any automation tool to deploy.

Any help will be really appreciated,

Thank you all,

Regards

© Stack Overflow or respective owner

Related posts about automated-deploy

Related posts about ASP.NET