tags:

views:

23

answers:

1

Hello Guys,

Kindly help me in architecting a solution which is required for my ongoing project. I have developed some WCF Services hosted as windows services which I did and working fine so far. Now I am asked to develop a master WCF type of service which should be intelligent enough to manage all other WCF service for possible corruption/errors and can repair them and restart. Thanks in advance.

A: 

I do something similar here.

  • Create a Dictionary<key, ApplicationDomain> collection into your main program
    • Key: something unique for each application domain, like a Guid or a System.Type.
  • That ApplicationDomain class exposes a internal property to access your AppDomain proxy (that which inherits a MarshallByRef class)
  • Load your WCF host into main program, so you'll get access to that collection
  • Every time your service get some access, you just need to take that key, access your proxy and do anything you want within your service hoster.

Keypoint: Your service must have access to all your service hosts.

Rubens Farias