The requested URL did not return JSON - examples and getting information on the error.

Sometimes, when you work in the Web Application, a pop-up with an error appears:

Error! The requested URL did not return JSON. or Parsing JSON Request failed.

Example:

This error means that the server returned an incorrect response. To identify the reasons for the error, you need to know the server response. You can do it in the browser, using the developer tools.

Getting the server response in Mozilla Firefox or Google Chrome:

1. Open ELMA in the browser, press F12 or Ctrl+Shit+I – the developer tools will open.

2. Reproduce the error.

3. Open the Network tab

4. The Network tab displays the executed methods. Click on the required method (the one that appeared as soon as the action was performed, usually the last one).

5. In the right part of the console, select the Response tab. Wait until it displays the server response.

6. The tab will show the server response and the error stack trace, for example:

<h2>Unfortunately, and error occured.</h2>
<h3>If the error reoccurs, contact the system administrator and pass them the error text
</h3>
<div>
System.InvalidCastException: Не удалось привести тип объекта &quot;Telerik.Web.Mvc.Infrastructure.AggregateFunctionsGroup&quot; к типу &quot;EleWise.ELMA.Model.Entities.IEntity&quot;.</h3>
    <pre id="st_81ed0915_8e45_4a39_bf70_13f04e40230b"class="exception">   в System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
   in System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
   in EleWise.ELMA.Web.Mvc.Controllers.TablePartController.GetGridResult(TablePartData data)
   in EleWise.ELMA.Web.Mvc.Controllers.TablePartController.Grid(GridCommand command, TablePartRequestData data)
   in lambda_method(Closure , ControllerBase , Object[] )
   in System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   in System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   in System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   in System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   in System.Web.Mvc.Controller.ExecuteCore()
   in System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   in System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
   in System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
   in Orchard.Mvc.Routes.ShellRoute.HttpAsyncHandler.EndProcessRequest(IAsyncResult result)
   in System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   in System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)