我正在尝试将Ninject 2.0与Asp .Net 3.5 Web应用程序一起使用.以下是我正在使用的DLLS及其版本.
在我的global.ascx.cs中,我有以下方法.
protected override IKernel CreateKernel()
{
IKernel kernel = new StandardKernel();
kernel.Bind<IDataAccess>().To<DataAccessEntBlock>().InSingletonScope();
return kernel;
}
Run Code Online (Sandbox Code Playgroud)
当我运行应用程序时,我得到以下错误.
Error activating ILoggerFactory
No matching bindings are available, and the type is not self-bindable.
Activation path:
1) Request for ILoggerFactory
Suggestions:
1) Ensure that you have defined a binding for ILoggerFactory.
2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
3) Ensure …Run Code Online (Sandbox Code Playgroud)