Sitecore controller implementation that raises a StackOverflowException

I'm trying to make a simple rendering of a controller with Sitecore 8 and for some reason it creates StackOverflowExceptiona line in the main layout markup containing a link to the placeholder in which it should be presented. The workflow crashes, but you can see the stack overflow while debugging the process:

w3p crashStackoverflow

Here is my main controller:

Controller / view

And here is my definition of controller rendering:

enter image description here

Playback Notes:

  • This happens in the vanilla installation of Sitecore 8 (version 150427 - installed via SIM card).
  • An MVC project is also created using vanilla with an empty ASP.NET project, then NuGetting in MVC 5.1.
  • Web.config and Global are added to the project from Sitecore's root site wwwroot.

FYI - - , , ,

+4
3

, .

ViewResult, ( Sitecore), null:

@{
    Layout = null;
}

MVC , , , Sitecore placeholder, StackOverflowException.

, Sitecore PartialViewResult ViewResult , null.

+3

, View() - , Sitecore .

View() :

return View("/Views/Courses/Index.cshtml");

, .


EDIT:

@David Masters, - View PartialView . :

return PartialView("/Views/Courses/Index.cshtml");
+1

, placeholder -, sitecore/layout/placeholder ?

-, .

,

!!

+1

All Articles