I have been reading about IoC lately, and I think it would definitely come in handy in the WCF web-service I am developing. However, it seems that Ninject, StructureMap and Spring.Net (I only did check these three) require the custom Factory
attribute to be added to the *.svc
file:
<%@ ServiceHost Language="C#" Debug="true" Service="SomeService" CodeBehind="SomeService.svc.cs" Factory="Ninject.Extensions.Wcf.NinjectServiceHostFactory" %>
The problem is that, due to the architecture of the system where the service will be deployed, I am already using a custom factory which is a must-have (a requirement) for this project. Can I somehow overcome this situation?