I know this may sound stupid but I am not able to include a controller rendering in the default Sitecore 8.1 layout.
I've created a controller in my MVC project and a controller rendering assign to the HelloController index action into sitecore. In the Home page I've added the controller as the sample rendering was done initially.
Someone said here that "layout was still pointing to default aspx instead of cshtml which caused this issue" I don't know how to change this.
In logs I've got an error like this:
Rendering control {id} not found for '/sitecore/content/Home'. Item id: {id}, database: web.
but the rendering exist in web database. I've even tried in the new Experience Editor and got the same error but this time on master database which is absurd since the element was created on master database.
The controller works as expected when I create my own layout and add the controller to the page.
The questions are: Why I cannot add a controller rendering to the layout? How can I change that the layout to point to cshtml instead of aspx?
Unfortunately all the sample layouts and renderings are written in ASP.net WebForms and not in ASP.net MVC.
You can’t mix MVC and WebForms components in one single http request
Please install this package in your solution and it will work.
http://ctorio.aquasonic.ch/content/2014/04/Sample-MVC-1.0.zip
To point a layout to a aspx, you need to change the path to the cshtml file. Default layout . Check below picture: