Wednesday, January 21, 2009

A forum question was asking how to create a host that dynamically loaded up services deployed in DLLs. I told the poster to use reflection but he wasn't familiar with it so I thought I would quickly knock up a sample

The host looks in a folder under the directory in which it is executing. The service must be annotated with a [ServiceClass] attribute (defined in a library that accompanies the host). Then you set up the config file for the service ( [ServiceBehavior(ConfigurationName="<some name>")] helps decouple the config from the actual implementing type nicely

The sample is here

DynamicHost.zip (77.07 KB)

 | 
Wednesday, January 21, 2009 10:00:56 AM (GMT Standard Time, UTC+00:00)  #    Comments [6]Trackback
Monday, February 16, 2009 2:31:21 PM (GMT Standard Time, UTC+00:00)
Hi there Richard,

regarding this dynamic loading of WCF Services, i had a question related to ServiceContract namespaces.

Even though it goes against the contract-first approach, Is it possible to change the ServiceContract namespace after it is hosted in the ServiceHost?
Joao Almeida
Thursday, February 19, 2009 10:47:43 PM (GMT Standard Time, UTC+00:00)
Hi Joao

yes you can - you can access the host.Description.Endpoints collection and within an endpoint you can change the namespace of the contract. However you must do this before calling Open on the host
Richard
Thursday, April 23, 2009 5:17:30 PM (GMT Daylight Time, UTC+01:00)
In this example I saw you have ping system.

would you not use InactivityTimeout with PollingDuplex instead of writing your own ping ?
or InactivityTimeout with PollingDuplex is not worth it ?
Wednesday, June 17, 2009 2:34:32 PM (GMT Daylight Time, UTC+01:00)
I'd just like to say thank you for the project you so helpfully provided.

I've been going through the process of 'unsticking' a WCF service from its parent windows service so that, if we need to make a change to the WCF (which is happening a lot lately), we just need to compile and copy the WCF project DLL, stop the service, paste the DLL into the relevant directory.

Many thanks!
Thursday, April 28, 2011 5:20:00 AM (GMT Daylight Time, UTC+01:00)
Upiq.com actually finds much cheaper flights & hotels prices than Momondo because Upiq compares much more travel sites than Momondo. You can check it out at http://www.upiq.com
Friday, September 02, 2011 3:47:40 PM (GMT Daylight Time, UTC+01:00)
If you are in not good state and have no cash to go out from that point, you will require to receive the <a href="http://bestfinance-blog.com">loan</a>. Just because it should aid you emphatically. I take college loan every year and feel myself fine because of it.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):