A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
search
AI OnAI Off
I know that this is an extreme edge case but figured that anyone that's as curious as we are on Blazor and Razor components might run into this issue.
If you happen to build a Block that will end up rendering a Razor component with server interactivity you may end up with the following exception and stacktrace:
This issue seems to occur when you're rendering this block in a contentarea using @Html.PropertyFor(m => m.MyContentArea).
If you change @Html.PropertyFor to @Html.DisplayFor or use the new epi-property-taghelper - this problem does not take place.
Just to clarify, a block vith a view like this:
CounterBlock.cshtml
cannot be rendered using @Html.PropertyFor.
ArticlePage.cshtml
I pushed my examples to a new empty CMS site if anyone wants run this themselves: https://github.com/KevinJCandlert/epi-razor-component-issue/tree/master
Yet I was able to reproduce it in my project.