【发布时间】:2014-12-16 03:33:36
【问题描述】:
我刚刚让我的 MVC 控制器继承自 ServiceStackController,这是我所做的唯一更改,之前一切正常。
我的Configure() 中已经有以下行
//Set MVC to use the same Funq IOC as ServiceStack
ControllerBuilder.Current.SetControllerFactory(new FunqControllerFactory(container));
然后我尝试运行,但它失败了
routes.MapMvcAttributeRoutes();
与:
无法在控制器上调用操作方法“T TryResolveT”,因为 action 方法是一个泛型方法。
如果我注释掉最初导致错误的控制器的整个文件,它会在下一个失败。
我承认,到目前为止,我只是关闭了 Visual Studio 并进行了重建……ServiceStack 版本 4.0.32。我明天会尝试更新 nuget 包。
【问题讨论】: