Uncategorized

Updating ASP.NET Assemblies

August 13, 2008

author:

Updating ASP.NET Assemblies

I posted a comment on Rick Strahl’s post on Server Errors when updating live Web applications online about a technique to update assemblies of live apps. I use the following approach:

1) I only keep the
assemblies unlikely to change in bin (i.e. components, third-party libs
etc.). I put my app’s assemblies into a sub-folder of bin and name the
folder according to the date (for example: bin\20080801)

2) My web.config has the following:



When
I need to update assemblies, I just upload them into a new sub-folder
in bin, again with a name corresponding to the current date
(bin\20080812). After the upload is complete, I upload web.config with
a change to the sub-folder name. The app re-starts and picks up the new
assemblies and forgets about the old sub-folder assemblies which I can
leave or delete.

Seems to work and has the added benefit of speeding up the app start since the sub-folder assemblies are ignored until needed.

Co-founder/CTO WhenHub; co-founder DNN Software; founder Edaptable; educator; Open Source proponent; Microsoft MVP; tech geek; creative thinker; husband; dad. Personal blog: http://www.kalyani.com. Twitter: @techbubble
Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.