I've implemented the antiforgerytoken in my MVC 2 app.
I have also added a machine key in the web.config
. When the session expires and I try and do a post it throws a A required anti-forgery token was not supplied or was invalid
error.
It seems like the antiforgery token is expiring.
My question is
- Why is it throwing an error after session expiry?
- How long is the token valid for?