I\'m developing an asp.net mvc 5 application in which I was trying to redirect to the ReturnUrl by applying the code below :
[HttpPost] [AllowAnonymous] publ
I was getting same error with Response.Redirect(returnUrl). After changing to Response.Redirect(returnUrl, false) fixed the issue.
Response.Redirect(returnUrl)
Response.Redirect(returnUrl, false)