在控制器上找不到公共操作方法“缓存”

时间:2012-05-25 07:54:45

标签: asp.net-mvc asp.net-mvc-3 telerik asp.net-mvc-routing telerik-mvc

我在执行A public action method 'cache' was not found on controller时偶尔会遇到actionresult。虽然这里没有在我的代码中定义或使用缓存。不知道从哪里得到这个。它发生在telerik mvc grid的ajax绑定上。这是来自elmah的堆栈跟踪

HTTP Referrer
/mycontroller/75/myaction
Path Info
/mycontroller/cache/b19858cce4adf72d090c2334d5584f06

栈跟踪

    System.Web.HttpException (0x80004005): A public action method 'cache' was not found on controller 'myapp.Controllers.MyController'.
   at System.Web.Mvc.Controller.HandleUnknownAction(String actionName)
   at System.Web.Mvc.Controller.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
   at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
   at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
   at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
   at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
   at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
   at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
   at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
   at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

1 个答案:

答案 0 :(得分:5)

有一个与此说明相符的Chrome错误:http://code.google.com/p/chromium/issues/detail?id=132059 根据问题描述,其他浏览器不会出现这种情况,因此Chrome很可能无法使用它。然而,这个错误尚未得到证实,并且有多种理论可能导致它。我建议你自己测试多个浏览器以检查它是否与Chrome有关。