2013-04-20 33 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")就像我的意思。該網頁是遞歸調用自己,而不是簡單地給我一個網址...哎呀。