I have been working on a WCF service library where hopefully all the business logic will end up living. The problem that I am running into is that sometimes I have to make quick fixes to a service and in order to apply those fixes I have to stop the Windows Service, replace the service dll and then restart the Windows service. This is going to start to cause additional headaches as we start migrating more and more of our logic to this layer and have to shutdown the entire service in order to make any changes.
What I would like to do is create an empty shell of a Windows service and dynamically load and unload the services. What is the best way to load and unload .Net DLLs on demand? Or is it better to rely on IIS for this kind of service?
If you are using WCF, one name you need to be familiar with is Juval Lowy. He is the founder of IDesign and one of the most recognized experts regarding WCF. His book Programming WCF Services is highly recommended.
The IDesign website offers a whole series of free-to-use downloads related to WCF. All you have to do is provide your email address and abide by IDesign’s standard licensing agreement.
Of particular interest to you may be the App Domain Host, the In-Proc Factory, and the In-Proc Hosting downloads found here.