3

I keep getting the error Anti forgery token is meant for user "" but the current user is "user". This is only happening while using Google Chrome and happens randomly too.

I have seen the other Stackoverflow threads and have tried all of them but none work.

Here is What I have tried

1) Disabled Page Caching

2) AntiForgeryConfig.SuppressIdentityHeuristicChecks = true.

3) [OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")] on the Login Action

This only happens with Google Chrome (Usually after 4th or 5th try of logging out/logging in), I have tried all browsers and this issue never pops up.

tereško
  • 58,060
  • 25
  • 98
  • 150
Mike Diaz
  • 2,045
  • 4
  • 32
  • 55
  • It'd be helpful if you told us what platform you're working on. "the login action" is basically meaningless. – Marc B Sep 30 '13 at 20:31
  • Did the same and more, kept having the same problem, but what helped was this answer: http://stackoverflow.com/a/19471680/1216242 – ckonig Feb 17 '15 at 20:57

1 Answers1

0

Although you have mentioned that you have disabled the Page Caching but ur browser might already have some cache in the store. Press Ctrl+F5 in your browser to force the response from the server to be loaded. Hopefully you will not get the error any longer :)

Shahriar Hossain
  • 935
  • 9
  • 20