ASP.NET MVC StackOverflowException Loading dynamic menu from xml in Layout
问题 I try to put a dynamic menu (load from xml) in my Layout but I've got a StackOverflowException in PartialController.cs/MainMenu() I don't understand why my code throw a StackOverflowException because I don't have a loop (or I don't see it !). Layout.cshtml : .... <div id="menu"> @if (Request.IsAuthenticated) { Html.RenderAction("MainMenu", "Partial"); } </div> .... MainMenu.cshtml : @model Geosys.BoT.Portal.POC.Business.Menu @foreach (var item in Model.Nodes) { <ul> <li> @item.Name <ul>