【问题标题】:InsufficentExecutionStackException in MVC Razor fileMVC Razor 文件中的 InsufficientExecutionStackException
【发布时间】:2013-04-20 09:27:36
【问题描述】:

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

@model HSServer.Models.LoginModel

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

使用Layout = null;,使其不使用母版页。

我尝试运行应用程序,它在 Layout = null; 行上抛出 InsufficentExecutionStackException 并说

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 = null 无关,因为删除它并没有帮助,只是将错误向上移动了一行。还在挖。

【问题讨论】:

    标签: asp.net-mvc razor


    【解决方案1】:

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

    在正文中,我调用的是@Html.Action("Login"),而不是像我想要的那样调用@Url.Action("Login")。该页面正在递归调用自身,而不是简单地给我一个网址......哎呀。

    【讨论】:

      猜你喜欢
      • 2011-07-26
      • 1970-01-01
      • 1970-01-01
      • 2012-12-22
      • 1970-01-01
      • 2012-08-28
      • 2020-06-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多