Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 29, 2012 01:39 PM by alvingeorge
Jul 28, 2012 07:12 PM|LINK
Im trying to redirect to another action in the same controller which is decorated with
but since im not passing __RequestVerificationToken token,So it throws exception
ErrorMessage:A required anti-forgery token was not supplied or was invalid. Why im using ValidateAntiForgeryToken as attribute for action because, FXCop raises warning whenever i run the FXCOP to decorate with ValidateAntiForgeryToken.
Jul 28, 2012 07:19 PM|LINK
try to add a antiforgerytoken before you redirectoaction.
add to Request.Form
Jul 29, 2012 12:23 PM|LINK
Can u please little bit clear on this. Since my FormCollection has token key in inital request, do u want me add to request form collection once again b4 Redirectaction calling
Jul 29, 2012 01:39 PM|LINK
i think you need to check why the second method is having that attribute? is that action is directly called from any page using any post operation?
RedirectToAction is httpget method so the vaidateantiforgery is not requried.
please try to create another common action method from the current methods with only code required to reuse and then you can access that method from both action methods