Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > Indigo

Vista - Updating hosted service

 
 
Old 09-19-2006   #1 (permalink)
=?Utf-8?B?dnJhZGVuYnVyZw==?=


 
 

Updating hosted service

I'm designing a windows service to run a self-hosted scenario of services
that are loaded from GAC. I've created a "drop" folder, in which to drop the
..dll of the service I want to host. My service watches this folder and when a
file has been dropped in, I install it into the GAC and load the ServiceHost.
Now, my trouble is that when I'm "updating" an existing hosted service, it
does not reflect the updated code that I've installed to the GAC, even though
I close the ServiceHost and create a new service host from the GAC. It seems
to cache to original service somewhere until I actually restart my Windows
service. Is there a way to dynamically change the hosted service without
having to restart the entire windows service, which will be hosting a variety
of other hosted services which don't need to be restarted?

My System SpecsSystem Spec
Old 10-15-2006   #2 (permalink)
Claus Konrad


 
 

RE: Updating hosted service

You are not using a fully qualified name when loading the dll?
When loading the new dll using reflection, use the LoadFile over LoadFrom
method as this gives you the correct assembly (presented a full path).

Curiousity: why install it into the GAC? It would work just as well without
all the hassle of interacting with the GAC.
--
rgds.
/Claus Konrad


"vradenburg" wrote:

> I'm designing a windows service to run a self-hosted scenario of services
> that are loaded from GAC. I've created a "drop" folder, in which to drop the
> .dll of the service I want to host. My service watches this folder and when a
> file has been dropped in, I install it into the GAC and load the ServiceHost.
> Now, my trouble is that when I'm "updating" an existing hosted service, it
> does not reflect the updated code that I've installed to the GAC, even though
> I close the ServiceHost and create a new service host from the GAC. It seems
> to cache to original service somewhere until I actually restart my Windows
> service. Is there a way to dynamically change the hosted service without
> having to restart the entire windows service, which will be hosting a variety
> of other hosted services which don't need to be restarted?

My System SpecsSystem Spec
 

Thread Tools


Similar Threads
Thread Forum
WCF service hosted in IIS .NET General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46