2013-04-20 27 views
2

所以我正在尝试使用asp net mvc 4.5和我在我的登录剃须刀视图中工作。这页是与众不同,所以我必须在顶部MVC Razor文件中的InsufficentExecutionStackException

@model HSServer.Models.LoginModel 

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

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

我尝试运行应用程序,它抛出一个InsufficentExecutionStackException上线Layout = 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 = null作为去除没有帮助,只是移动的错误一行。仍在挖掘。

回答

5

明白了。我不知道它复制了this

在身体上我打电话@Html.Action("Login")而不是@Url.Action("Login")就像我的意思。该网页是递归调用自己,而不是简单地给我一个网址...哎呀。