Server cannot set status after HTTP headers have been sent IIS7.5

后端 未结 10 940
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-27 12:32

Sometimes I get exception in my production environment:

  • Process information
    • Process ID: 3832
    • Pr
10条回答
  •  甜味超标
    2020-11-27 12:39

    Just to add to the responses above. I had this same issue when i first started using ASP.Net MVC and i was doing a Response.Redirect during a controller action:

    Response.Redirect("/blah", true);
    

    Instead of returning a Response.Redirect action i should have been returning a RedirectAction:

    return Redirect("/blah");
    

提交回复
热议问题