I have a problem trying to initialise my IOC container in a WCF application. The application is non HTTP based using WAS.
When I start the application I get this error message...
Kernel was null, did you forgot to call DefaultServiceHostFactory.RegisterContainer
I have seen other answers to this solution which say to do the following...
- Add a Factory definition to the ServiceHost definition e.g.
Factory="Castle.Facilities.WcfIntegration.DefaultServiceHostFactory, Castle.Facilities.WcfIntegration"
- Create a class in th App_Code folder with a static method called AppInitialize(). This method should then automatically be called and you can use it to register your container.
I have done this but my AppInitialize method is not called and I am still getting the error above.
Thanks.