I have a problem trying to initialize my IOC container in a WCF application. The application is not based on HTTP using WAS.
When I launch the application, I get this error message ...
Kernel was null, did you forgot to call DefaultServiceHostFactory.RegisterContainer
I saw other answers to this solution that say to do the following ...
- Add the Factory definition to the ServiceHost definition, for example.
Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory, Castle.Facilities.WcfIntegration"
- Create a class in the App_Code folder with the static AppInitialize () method. Then this method is automatically called, and you can use it to register your container.
I did this, but my AppInitialize method is not being called, and I still get the error above.
Thank.
source
share