2

所以我正在尝试使用 asp net mvc 4.5,并且我正在我的登录剃刀视图中工作。此页面与其他页面不同,所以我在顶部

@model HSServer.Models.LoginModel

@{
    ViewBag.Title = "Log in";
    Layout = null;
}

withLayout = null;以便它不使用母版页。

我尝试运行该应用程序,它在线上抛出一个 InsufficentExecutionStackExceptionLayout = null;并说

Insufficient stack to continue executing the program safely. This can happen from
having too many functions on the call stack or function on the stack using too
much stack space.

谁能告诉我这是怎么回事!

编辑

似乎它与Layout = nullas 删除无关,这没有帮助,只是将错误向上移动了一行。还在挖。

4

1 回答 1

5

知道了。我在不知不觉中复制了它。

在我呼唤的身体里,@Html.Action("Login")而不是@Url.Action("Login")像我本意的那样。该页面递归地调用自己,而不是简单地给我一个网址......哎呀。

于 2013-04-20T01:27:36.413 回答