Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Debasish Gracias 12 posts 82 karma points
    14 days ago
    Debasish Gracias
    0

    Issue with Umbraco Forms with anti forgery token and Azure front door caching enabled

    I just ran across an issue I hadn't experienced before, and wanted to see if there was a solution for it.

    We have umbraco site version 7.15.3 running on Azure. We are using umbraco forms V 7.0.7 and has the anti forgery token enabled in UmbracoForms.config. We also have enabled default caching on front door (output caching). With this setup, when a form is submitted we get the below error

    System.Web.Mvc.HttpAntiForgeryException (0x80004005): The required anti-forgery cookie "__RequestVerificationToken" is not present.
    at System.Web.Helpers.AntiXsrf.TokenValidator.ValidateTokens(HttpContextBase httpContext, IIdentity identity, AntiForgeryToken sessionToken, AntiForgeryToken fieldToken)
    at System.Web.Helpers.AntiXsrf.AntiForgeryWorker.Validate(HttpContextBase httpContext)
    at System.Web.Helpers.AntiForgery.Validate()
    at Umbraco.Forms.Core.Common.ValidateFormsAntiForgeryTokenAttribute.OnAuthorization(AuthorizationContext filterContext)
    

    Things we have tried

    1. Disabling caching on front door and enabling anti forgery token works i.e the umbraco forms are successfully submitted

    2. Enabling caching on front door and disabling the anti forgery token works i.e the umbraco forms are successfully submitted

    Questions:

    1. Is there a way to get it to work with caching enabled on front door and with anti forgery token enabled? H
    2. Has this been addressed with the latest version of umbraco forms and umbraco cms?
Please Sign in or register to post replies

Write your reply to:

Draft