views:

3124

answers:

3

Hi folks,

Is there any easy way to Deploy/Publish a website written in asp.net ? And what is the difference between deploy and publish ?

+7  A: 

Here is a site that shows different technicques how to acoomplish this. There are many techniques that can be utilized as a deployment strategy for your web application.:

Beansoftware How to Deploy ASP.NET Web Application

TStamper
+3  A: 

Alt + B + H combination (opens publish window for ASP.NET web site / application) is the most simple way to deploy an applidation to a location.

Publish used for compiling and deploying application to server.

Canavar
+4  A: 

Well, it depends on what you're trying to accomplish from an uptime/availability point of view. The publish/xcopy/installer options are interesting but all neglect to address the issue that it takes time for those options to complete. From the time the first file is copied into the directory to the time the last file is copied in the site is in an inconsistent state.

The ASPX files may refer to data-layer objects that aren't in the bin directory yet, or the bin directory may have a DLL w/a changed set of params on a function, but the aspx hasn't been installed yet, so the aspx is still looking for the old function. In short because the deployment isn't an atomic process you can/will have problems.

We've addressed this issue by installing the new files to a new directory, and then going into IIS and changing the website to point to the new directory. This makes the change an atomic process and makes things much smoother. Is it perfect? Nope. You can have viewstate issues or session issues (session is preserved, but maybe the new code looks for something in session that the old code didn't set) but it still makes the process much smoother.

Of course none of these solutions address the other non-atomic part of upgrading the website... the database. Again, the process of changing the DB schema takes time. Do you upgrade the code first or the database first? Can the DB change work w/out the code change (a new column that supports null or has a default) or can the code change work w/out the DB change (removing a column)? That's a case-by-case analysis, and isn't addressed by any of these solutions

Of course, if you can kick your users off the site for a period of time then life is easier, but if you're trying to achieve 100% uptime then it's not so simple.

WaldenL