LDJ*_*LDJ 2 deployment asp.net-mvc ninject asp.net-mvc-4
我正在尝试部署一个使用Ninject for DI的网站,该网站在我的开发机器上本地运行良好(不是全部!).当部署到我的主机(使用visual studio ftp发布选项)时,我收到以下错误:
Method not found: 'System.Delegate System.Reflection.MethodInfo.CreateDelegate(System.Type)'.
Run Code Online (Sandbox Code Playgroud)
和
[InvalidOperationException: An error occurred when trying to create a controller of type 'Website.Controllers.HomeController'. Make sure that the controller has a parameterless public constructor.]
Run Code Online (Sandbox Code Playgroud)
查看堆栈跟踪,看起来NinjectDependencyResolver.GetService(Type serviceType)是失败的方法.正如我所说,它在当地的工作正常,所以不知道在哪里或如何处理这个.谷歌没有提出任何有用的东西.
如果那是相关的,我正在使用Ninject 3.0.1.10.
编辑:我已经添加了无参数的构造函数到homecontroller,但它没有任何区别,并存在相同的错误....