This question is locked. New answers and comments are not allowed.
Forgive this post if it's a duplicate somewhere, but I can't find much on the issue.
I have a standard Ajax data binding for an MVC Grid, similar to the example at http://demos.telerik.com/aspnet-mvc/grid/ajaxbinding
My action looks like:
This works with no problems most of the time. On occasion though, more so when the page has been sitting idle for a while, I get the following exception when a request for data binding is made:
It appears to be looking for the view associated with this action. However, there is no view for this action because of the nature of the GridAction. In the demo there doesn't appear to be a view for the action, nor when it does work properly does it try to get the view. Why would this be happening and/or what precautions should I take to ensure this doesn't keep happening.
The way the action is setup by Telerik's example does seem to make me scratch my head because by the mere fact that it's returning a view with a model (return View(model)), that it SHOULD be looking for a view all the time. I assume there's some magic involved, probably in the GridAction attribute that overrides the standard behavior. If that's the case, there appears to be some condition that falls back to the default behavior, but I'm not aware of what could do that.
Any help with this would be fantastic, thanks!
I have a standard Ajax data binding for an MVC Grid, similar to the example at http://demos.telerik.com/aspnet-mvc/grid/ajaxbinding
My action looks like:
[GridAction] public override ActionResult DeliverablesData(Guid sceneId, Guid? deliverableId) { var deliverables = ...; return View(new GridModel(deliverables)); }This works with no problems most of the time. On occasion though, more so when the page has been sitting idle for a while, I get the following exception when a request for data binding is made:
System.InvalidOperationException: The view 'DeliverablesData'or its master was not found or no view engine supports the searched locations. The following locationswere searched:~/Views/Deliverables/DeliverablesData.aspx~/Views/Deliverables/DeliverablesData.ascx~/Views/Shared/DeliverablesData.aspx~/Views/Shared/DeliverablesData.ascxat System.Web.Mvc.ViewResult.FindView(ControllerContext context)at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContextpreContext, Func`1 continuation)at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass27.<BeginInvokeAction>b__24(IAsyncResult asyncResult)at System.Web.Mvc.AsyncController.<>c__DisplayClass19.<BeginExecuteCore>b__14(IAsyncResult asyncResult)at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResultar)at System.Web.Mvc.AsyncController.EndExecuteCore(IAsyncResult asyncResult)at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResultar)at System.Web.Mvc.AsyncController.EndExecute(IAsyncResult asyncResult)at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__4(IAsyncResultasyncResult)at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResultar)at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
It appears to be looking for the view associated with this action. However, there is no view for this action because of the nature of the GridAction. In the demo there doesn't appear to be a view for the action, nor when it does work properly does it try to get the view. Why would this be happening and/or what precautions should I take to ensure this doesn't keep happening.
The way the action is setup by Telerik's example does seem to make me scratch my head because by the mere fact that it's returning a view with a model (return View(model)), that it SHOULD be looking for a view all the time. I assume there's some magic involved, probably in the GridAction attribute that overrides the standard behavior. If that's the case, there appears to be some condition that falls back to the default behavior, but I'm not aware of what could do that.
Any help with this would be fantastic, thanks!