My objective is register a Windsor Container for my non-http WCF service. However I cannot seem to work out where to put the code to register and initialise the container.
I have tried putting ...
Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory, Castle.Facilities.WcfIntegration"
... onto my ServiceHost declaration in my .svc file however this does not appear to cause the Application_Start() method in my Global.asax.cs to fire.
I have also tried putting a static method inside a class as follows...
public static void AppInitialize()
{
}
... however this method also does not fire.
The method received from Castle Windsor is...
Kernel was null, did you forgot to call DefaultServiceHostFactory.RegisterContainer() ?
I could really do with a code an example that shows exactly where to register the container. Additionally where do I dispose of the container.
Thanks.