"Error occurred during a cryptographic operation" when decrypting Forms cookie

I just had this aswell, i deleted the UserTokenCaches table entries from the database.


If you are using forms auth. you can signout when you catch the exception and allow your users to login and create a valid cookie

catch (CryptographicException cex)
{
    FormsAuthentication.SignOut();
}

For anyone who hasn't solved their problem, I was missing the "machineKey" entry for encrypt/decrypt in my web.config


I faced the same problem. I just cleared all of browser's cookies and cache data and it got fixed.I hope it will work for you too.