November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
To add more information, it looks like the issue is around having multiple content areas defined in the preview block of the page. If I use the following code, it works, but as soon as I uncomment the section, it throws the textwriter error.
<div class="row"> <div class="span12"> @Html.PropertyFor(m => m.PreviewBlock.ContentArea) </div> </div> @*
<div class="row"> <div class="span8"> @Html.PropertyFor(m => m.PreviewBlock.ContentArea) </div> </div> <div class="row"> <div class="span4"> @Html.PropertyFor(m => m.PreviewBlock.ContentArea) </div> </div>
*@
How much have you copied from the PreviewController in Alloy?
Can you also explain the \Util\Views\Shared\DisplayTemplates\ContentArea.ascx more? What does the ascx look like? Why have you decided to have an .ascx instead of a razor .cshtml?
Technically there should be nothing wrong with mixing these but I would recommend sticking to one of either and .cshtml/Razor is basically standard when using MVC.
I copied the preview controller exactly as is from the Alloy site. We aren't using the .ascx control at all, so I'm not sure whre you noticed that. Everything we are doing is in .cshtml.
The 2nd post I made regarding the multpile content areas may be helpful since when I comment out the other content areas it works. Which defeats the purpose of having a preview for block since I want ot see what it would look like at different break points.
According to your callstack you seem to have something that has registered a ContentArea.cshtml.
ASP.util_views_shared_displaytemplates_contentarea_ascx.__Render__control1(HtmlTextWriter __w, Control parameterContainer) in C:\Devspace\VSOnline\E-Commerce Website\Features\InitialDevelopment\CollectionsEtc.Site\Util\Views\Shared\DisplayTemplates\ContentArea.ascx:4
It seems to be located in the Utils/Views/Shared folder which also looks a bit wierd to me as views normally is put in the Views folder directly under your project root - not in a Utils folder.
Some clues to find this registration would be to look in your projects for TemplateModel, IRenderTemplate, RenderDescriptor.
A coworker of mine was able to figure out the issue. The ultimate issue was that he had some structure map code that was initializing things automatically instead of having to do it quasi-manually, and this code was causing the request to be issued multiple times, thus creating the error. He removed the extra structure map code and the project started working again.
I am very new to Epi, and I am setting up our project from the ground up. I have run into an issue where when I try and create a PreviewPage to be able to preview my block. I have looked online at the various resources and I haven't uncovered any problems. I copied the necessary files from the Alloy sample site into my project and it is having the following error.