IOC container working with asp.net mvc 2.0

百般思念 提交于 2019-12-13 16:29:27

问题


Is there any IOC container that already implements a controller factory compatible with asp.net mvc 2.0 ....if so i'll move my projects to 2.0 to test... Anyone know a good reference about it?


回答1:


We're using NInject and it works like a charm, too. I compiled it with MVC2 RTM and it works even with that.




回答2:


MVCContrib has four different flavors for you ( StructureMap, Windsor, Spring.Net, Unity ) http://github.com/mvccontrib/MvcContrib/tree/mvc2/src/

Here is a direct link to the Unity one: http://github.com/mvccontrib/MvcContrib/blob/mvc2/src/MvcContrib.Unity/UnityControllerFactory.cs




回答3:


Good question. I migrated a project to ASP.NEt MVC 2 using Castle Windsor as IoC container. Been struggling to get areas to work to no avail. Keep getting System.ArgumentNullException exceptions. Other than this, everything works as expected...



来源:https://stackoverflow.com/questions/1926391/ioc-container-working-with-asp-net-mvc-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!