Daniel
> --
> You received this message because you are subscribed to the Google Groups "ninject" group.
> To post to this group, send email to nin...@googlegroups.com.
> To unsubscribe from this group, send email to ninject+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ninject?hl=en.
>
What version are you using? Latest?
Has a setkernel method. You need toset the kernel so that it is known to the servicehostfactory
Daniel
--
public class ApplicationServiceHostFactory : NinjectServiceHostFactory
{
protected override System.ServiceModel.ServiceHost CreateServiceHost(Type serviceType, Uri[] baseAddresses)
{
lock (this)
{
if (KernelContainer.Kernel == null)
{
KernelContainer.Kernel = new StandardKernel(new ServiceModule());
}
if (KernelContainer.Kernel.GetBindings(typeof(ServiceHost)).Count() == 0)
{
KernelContainer.Kernel.Bind<ServiceHost>().To<NinjectServiceHost>();
}
}
return base.CreateServiceHost(serviceType, baseAddresses);
}
}
}