Filtering DynamicContent items on Frontend
I am running into Validation of viewstate MAC failed errors when trying to follow this example.
If I enter a value into the city text box and click the search button I receive the validation of viewstate MAC failed error. I have paging turned on and I noticed that if I go to a different page other than the default page #1 that the search feature appears to work fine. It is just on this initial page that it fails.
Things I have checked:
1.) There is not action value set on my masterpage <form> tag. It reads <form id="mainForm" runat="server">
2.) I enabled viewstate from Titles & Properties for the page in question
I have created custom forms in the past and have not had to generate a machine key so this feels like something else going on, but any input would be helpful.
I do not get this error if I use a template that is based on Sitefinity's UI and not MasterPage.
I have narrowed it down to being an issue with one of my MVC widgets that is on the template. I am using nested templates based off a masterpage so when I base the page off just the master it does not have an issue, but once I base it off one of the nested templates with my MVC widgets it starts to have issues.
If I figure it out I'll update everyone.
So the culprit is that I decorated my controller action with
[OutputCache(NoStore =
true
, Duration = 0)]
I need to have the MVC widget not cache on the page, but I do not want to disable caching for the page entirely. I am aware that Sitefinity has some wrappers to setup cache substitution, but I have not used them before and am not sure how I should go about addressing this.
Any suggestions on what I could do to invalidate caching for an MVC widget that will not break the page when using custom filtering?
Hello Stacey,
My colleague has answered you in the support ticket. Please, feel free to share the resolution of this issue with the community, whether you like to do so.
Regards,
Nikola Zagorchev
Telerik
Can you share the resolution of this issue?