有谁知道一个很好的指南,以获得Ninject 2工作在ASP.NET MVC? [英] Does anyone know of a good guide to get Ninject 2 working in ASP.NET MVC?
问题描述
我的文档,努力弄清楚到底是什么,我需要。文档(我的理解)是1.5呢。
I'm struggling with the documentation to figure out exactly what I need to. The documentation (to my understanding) is for 1.5 anyway.
N.B:我不希望延长NinjectHttpApplication
N.B: I don't want to extend NinjectHttpApplication
我已经配置它在使用 NinejctControllerFactory 的Application_Start(),但我得到的一个空引用异常的 KernelContainer.Kernel 的时候它试图创建一个控制器。我在哪里配置内核如果我不延长NinjectHttpApplication?
I've configured it to use the NinejctControllerFactory in Application_Start() but I get a null reference exception on the KernelContainer.Kernel when it tries to create a controller. Where do I configure the Kernel if I'm not extending NinjectHttpApplication?
推荐答案
看看这个博客帖子。它应有助于澄清,你需要了解如何配置内核进行处理。
Take a look at this blog post. It should help clarify the process you need to perform on how to configure the kernel.
的http://www.kevinrohrbaugh.com/blog/2009/8/7/using-ninject-2-with-aspnet-mvc.html
这篇关于有谁知道一个很好的指南,以获得Ninject 2工作在ASP.NET MVC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!