Asp – Incrementally updating a asp.net web site

asp.net

Is there a good way to make incremental changes to an asp.net website without re-publishing the whole site?

I'm moving an old website from classic asp to asp.net, and one of the things that used to happen on the site was individual pages being changed in isolation. The site is only on a single server, and has a lot of files so doing a re-publish would take the whole site down for a while. I'd like to avoid that, or at least make that time as short as possible.

Each page does have a code behind file, and there's some stuff used by each page in App_Code (just in case that changes the answer).

Best Answer

If you're building a Web Site (rather than a Web Application, where all code is compiled into a .dll in the /bin folder), and it sounds like you are then you can indeed deploy only those files that have changed to the server - up to the value set in numRecompilesBeforeAppRestart in the <compilation> element of the machine or web.config files - this defaults to 15.

If you deploy a change to the /app_code folder this will cause a re-compilation of the site as this is a shared area.

One thing to point out: In VS2008 and below, the publish site command will often publish the entire site - I believe that this is much better in VS2010 where it's easier to publish just the changed files - so this will require a manual deployment of the changes.

Related Topic