New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the Community Exchange, where community members ask and answer questions about DNN. To get started, just start typing your question below and either select one of the suggested questions or ask a new question of your own.

DNN output cache issue with AntiForgeryTokens

Return to previous page

  • 10/12/2017
  • 2397 Views

Question:

Jacques Woolston 7 years ago

Hi All,

I've been testing the output cache in DNN9.1.1 and have come across an issue with a custom module which uses [ValidateAntiForgeryToken] on all WebAPI requests. Any page which is served up from the output cache does not have a __RequestVerificationToken cookie sent with it and thus all WebAPI requests made from pages served up by the cache then fail.

Has anyone encountered this before? And does anyone have a work around?

Obviously output caching could be disabled, but that would be missing the point and I don't want to cache another version on the page by varing the cache based upon the __RequestVerificationToken as that would be a waist of memory resources. Ideally I need to find a way of serving the page up from output cache but making sure a valid __RequestVerificationToken is also set at the same time.

Thanks


DNN output cache issue with AntiForgeryTokens

Jacques Woolston
Jacques Woolston 7 years ago
Add an Answer

Answers

Sign In to Participate
Or register to become a member