Base solution for your next web application
Open Closed

Redirect in MVC controller provoking Error #1485


User avatar
0
korigoth created

Hey,

I have a simple action that i removed all code except the RedirectToAction method and it's provoking an error each time i call it.

Can i know what i'm doing wrong ?

Error: An error has occured! Error detail not send by server. I have no log registred and AbpHandledExceptionData doesn't get fired.

[HttpPost]
        [AbpMvcAuthorize]
        public ActionResult CreateModel(CreateModelViewModel model)
        {
                return RedirectToAction("CreateModel");
        }

        [HttpGet]
        [AbpMvcAuthorize]
        public ActionResult CreateModel()
        {
            var model = AsyncHelper.RunSync(() => _modelService.GetModel());

            return View(model);
        }


js file

            abp.ui.setBusy(
                $('#ModelPanel'),
                abp.ajax({
                    url: abp.appPath + 'Model/CreateModel',
                    type: 'POST',
                    data: JSON.stringify({})
                })
            );

2 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Details of the error should be written the logs.txt file under Logs folder of your web project.

  • User Avatar
    0
    korigoth created

    The error was not logged in the log.txt file.

    But it was a noob mistake.... doing ajax call and returning View() was my error. When i switched to PartialView or JsonResult it worked again.