How to update an ASP.NET web application?

Simple question. If you have a compiled and published ASP.NET web application running on a server and you need to update, say, a line in one of the code files. Do you close the entire site, republish, and then download the site? Or are you posting directly to your site with users who are still using it?

+4
source share
3 answers

For yourself, put the file app.offline app_offline.htm on the site, and then rewrite the entire site with the latest published build.

There are several options when creating a site โ†’ one dll for the site or one per page. if you just updated one line in the code behind, and you chose the build option for one per page, then you can simply copy / paste this new DLL page.

I do not like this method personally. I find this simple for the app_offline.htm site.

+1
source

If this is a single file and a simple site that uses this app_code folder to store the code behind, I just xcopy up the new files. If I use the http expiration headers, I might need to do more precise planning to make sure things like javascript files and css lists match the rest of the updated site.

0
source

For emergency patches:

If this is just a code file, I copy the whole / bin / out and replace the whole DLL (mostly out of habit)

If its aspx, I just copy aspx.

For real deployments, I have an automated system that checks the code from the source control, builds a clean version of the assembly, shuts down the site, and then copies its deployment targets. Its a one-click process (thanks CruiseControl!).

0
source

All Articles