Server Cannot Append Header After HTTP headers have been sent Exception at @Html.AntiForgery

后端 未结 2 1338
北恋
北恋 2020-12-08 19:52

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         


        
2条回答
  •  萌比男神i
    2020-12-08 20:31

    I was getting same error with Response.Redirect(returnUrl). After changing to Response.Redirect(returnUrl, false) fixed the issue.

提交回复
热议问题