Ciddan, glad to see you found a resolution (albeit not ideal). I had the same question as you, and finally decided to use IIS to host the service and connected my custom Ioc classes (which are in my WCF Service Library) using the serviceHostingEnvironment service in my web.config. Something like that:
<serviceHostingEnvironment multipleSiteBindingsEnabled="true"> <serviceActivations> <add relativeAddress="./Service1.svc" service="WcfServiceLibrary1.Service1" factory="WcfServiceLibrary1.IocServiceHostFactory, WcfServiceLibrary1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> </serviceActivations> </serviceHostingEnvironment>
"./Service1.svc" is my file service, where WcfServiceLibrary1.Service1 is a specific imp. I hit a few stumbling blocks, but eventually managed to encapsulate Ioc from the WCF Service Library.
This blog post has been very helpful and contains some great tips.
source share