I am trying to redirect from a controller action (using RedirectToAction()
) to another action in the same controller.
The website is using @Html.AntiForgeryToken()
, and I get the error in the request:
Authorization header is missing
I haven't set [ValidateAntiForgeryToken]
on that method, and don't really need forgery checking for this one.
Does anyone know how should I proceed?
The actual behavior is that from a method, I redirect to another which is trying to download an excel file.
Thanks.
Why are you using redirect ? If you just want the output of another method, you can simple call
instead of
the later actually performs http redirect, which is a) slower b) you have to set context properly.