1

I am trying to preview a page from Sitecore Rock, from VS but I get this error. I have a Layouts, and I have putted that layouts in _Standard Values of that page. I don't know where is the problem now with this error.

Error Rendering View: /Views/TAC/Events/Layouts/Events.cshtml: Error while rendering view: '/Views/TAC/Events/Layouts/Events.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc'). at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)

enter image description here

  • 1
    You have a reference to sitecoredemo namespace in your view. And compiler cannot find it. What is your view code? Where that namespace comes from? Is it referenced from the web project? – Marek Musielak Feb 13 '19 at 8:56
  • The connection between the projects is throw Sitecore>Project Properties>Sitecore Explorer Connection. In the view I have the reference of Sitecore.Mvc. I have created even a Quick Publish between the two projects. – Po Po Feb 13 '19 at 9:26
  • what is full namespace of sitecoredemo? – Rama Krshna Ila Feb 13 '19 at 17:04
  • sitecoredemo.dev.local – Po Po Feb 13 '19 at 17:11
  • 1
    Put content of your /Views/TAC/Events/Layouts/Events.cshtml view into your question also content of Web.config file that sits in your Views folder – Peter Procházka May 21 '19 at 4:50
6

The issue happens because you've added the namespace of your project in the Views/web.config file while you haven't created any class yet.

Sitecore Labs Guide, Page 50

Sitecore Labs Guide

| improve this answer | |
0

The issue is related to the link field. For suppose if I add the wrong value in type(internal link) with the value of the url as (http://www.google.com). The link field is of type external link but not the internal in content.

| improve this answer | |
  • Yeah, based on the data you have entered it will automatically updated the type of the Link, you can check the raw value of the particular field. – Sudheer Suggu Nov 27 '19 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.