views:

166

answers:

1

I'm self-hosting several services where I do this to register the service:

host = new ServiceHost(typeof(MyService));
host.Open();

Behind the scenes, wcf instantiates my service via the default constructor.

Is it possble to use the WCF Integration Facility of Castle Windsor to get WCF to call on Windsor to create the service when I am self-hosting?

The example seems shows IIS hosted services where the 1st line of the MyService.svc file looks like:

<%@ServiceHost language=c# Debug="true" 
     Service="Microsoft.ServiceModel.Samples.CalculatorService" 
     Factory=WindsorServiceHostFactory%>

where presumably a factory is used by wcf to instantiate the service instance.

+1  A: 

This may be helpful:
How to host a WCF service that uses Castle Windsor in a Windows Service

But if it isn't, then I suggest you try asking on the castle user forum.

Cheeso
Thanks, this is almost exactly what I need. Excellent.
IanT8