我有这个错误:
Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper'.
有内部异常:
Child actions are not allowed to perform redirect actions.
知道为什么会这样吗?
顺便说一句,错误发生在这一行:
@Html.Action("Menu", "Navigation")
导航 Controller 中的菜单操作如下所示:
public ActionResult Menu()
{
return PartialView();
}
最佳答案
这发生在我身上,因为我在 Controller 上有 [RequireHttps],并且从另一个 Controller 调用了子操作。 RequireHttps 属性导致重定向
关于c# - "Child actions are not allowed to perform redirect actions",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8924529/