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.
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.
Sign up to join this communityWe 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.
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
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.