We are getting the below error in Sitecore Forms
on Production
site.
We are using Sitecore 9.1.1
version with SXA
.
I went through many articles/blogs but could not find anything relevant Please suggest.
We are getting the below error in Sitecore Forms
on Production
site.
We are using Sitecore 9.1.1
version with SXA
.
I went through many articles/blogs but could not find anything relevant Please suggest.
If the web.config file has the correct settings for the AntiForgery token, then you should verify that the ValidateAntiForgeryToken attribute is present in the controller responsible for form submission. Additionally, you should ensure that @Html.AntiForgeryToken() is present in the form view.
I have disabled the field caching section for rendering items associated with the page. Despite this, I encountered the same issue. Upon further investigation, I discovered that disabling the following three fields resolved the issue:
The way Anti-Forgery works in Sitecore is the following:
@Html.AntiForgeryToken()
HTML helper in the form razor view[ValidateAntiForgeryToken]
action filterIf you have these then an HTML code should be generated like below:
<input name="__RequestVerificationToken" type="hidden" value="xxxx">
Although the blog is about implementing forms in JSS, the concept could be understood from this link: Sitecore JSS Anti-forgery