I've been adding AntiForgeryToken
to my site, but I keep getting to errors
which refer to my login page (POST)
"The required anti-forgery cookie "__RequestVerificationToken" is not present."
The provided anti-forgery token was meant for user "", but the current user is "userXYZ".
My Login page is like so:
<form action="~/Login" method="post">
@Html.AntiForgeryToken()
...
</form>
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Login(login a)
{
}
I've looked at this:
and this
Anti forgery token is meant for user "" but the current user is "username"
But it's not clear to me what the answer is?
Any ideas?