Intermittent error thrown, "A required anti-forgery token was not supplied or was invalid."

Posted by Dave K on Stack Overflow See other posts from Stack Overflow or by Dave K
Published on 2010-05-06T23:12:53Z Indexed on 2010/05/06 23:18 UTC
Read the original article Hit count: 332

I'm occasionally getting this error during normal use, and I've not found a way to stop it without removing the attribute that requires the token, which I'd rather not do.

I've gotten this bug during my own testing (but seemingly randomly) and I know from my logging that actual logged-in users are getting it as well.

Does anyone know what would cause the antiforgerytoken system to break (other than a real attack), and how I could fix this without opening up a security hole in my forms?

Thanks!

© Stack Overflow or respective owner

Related posts about asp.net-mvc-2

Related posts about antiforgerytoken