In my NinjectWebCommon.csfile, in the CreateKernelmethod I use an injection like this
private static IKernel CreateKernel()
{
var kernel = new StandardKernel();
kernel.Bind<Func<IKernel>>().ToMethod(ctx => () => new Bootstrapper().Kernel);
kernel.Bind<IHttpModule>().To<HttpApplicationInitializationHttpModule>();
RegisterServices(kernel);
GlobalConfiguration.Configuration.DependencyResolver = new NinjectDependencyResolver(kernel);
GlobalHost.DependencyResolver = new SignalR.Ninject.NinjectDependencyResolver(kernel);
return kernel;
}
I thought I should do this for me, but I keep getting an error in SignalR injection, which
"Cannot implicitly convert type 'SignalR.Ninject.NinjectDependencyResolver' to 'Microsoft.AspNet.SignalR.IDependencyResolver'"
Any idea what the problem is?
source
share