Asp.Net MVC : Execution of the child request failed. Please examine the InnerException for more information

假装没事ソ 提交于 2019-12-04 06:05:35

Fixed:

The RenderAction() Method is below

        [HttpGet]
        public ActionResult RenderMenu()
        {
            //Do Stuff
        }

Removing the HttpGet Attribute has resolved the issue.

        public ActionResult RenderMenu()
        {
            //Do Stuff
        }

Would love to know why?

Jess

This is because your parent request is an [HttpPost], and the child request operates in the same verb as the parent. If your method is marked as [HttpGet], it will not respond to [HttpPost] requests. Hitting the action directly through your browser works because that is a GET. Hitting the action as a child action in the context of a POST will not work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!