Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What could be good ways to deploy ASP.Net Web Applications?

We currently deploy web applications by creating a database and running SQL scripts through query analyzer. Then we copy the output from "publish website" and set up that website in IIS.

We have seen websetup in visual studio, but that part seems to be thinly documented. For example, we are not clear how to ask the user for IP and password of SQL server. We also tend to get websites deployed this way coming up under folders like http://example.com/project, instead of just http://example.com.

Then there are issues with AJAX.Net not being installed or some or the other patch not applied.

So far, we have physical access to the servers. Pretty soon though we are going to be shipping CDROMs. What is the practical tradeoff between manual intervention and automation?

like image 860
Kinjal Dixit Avatar asked Sep 15 '08 13:09

Kinjal Dixit


2 Answers

Avoid Visual Studio deployment, and automate as much as possible. Web Deployment Projects and NAnt can be your friends!

Briefly, our deployment setup:

  1. We use RedGate SQL to script differences between dev and live database.

  2. An NAnt build file which calls MSBUILD to build the web deployment project (.wdproj), zips up the resulting compiled web app (along with the SQL change script) and then uploads the zip file to the server.

  3. On the server side, there is another NAnt build file which takes the application offline, backs up the database, backs up the website. runs the SQL change script, unzips the new version and brings the app online.

Step 3 is usually run "manually" (one double-click), but sometimes scheduled for late at night. You could do exactly the same from a CDROM, or even write a pretty little Windows Forms app as a wrapper.

Quite happy to give details of the NAnt script if you're interested.

like image 98
user7239 Avatar answered Oct 21 '22 22:10

user7239


Have you tried using Web Deployment project? There is support for VS 2008 also now..

like image 2
Gulzar Nazim Avatar answered Oct 22 '22 00:10

Gulzar Nazim