Setting Response.StatusCode in View in ASP.NET MVC2
Posted
by Guy
on Stack Overflow
See other posts from Stack Overflow
or by Guy
Published on 2010-06-07T00:05:36Z
Indexed on
2010/06/07
0:12 UTC
Read the original article
Hit count: 296
asp.net-mvc
|asp.net-mvc-2
I've just converted a project from MVC1 to MVC2. In the MVC1 project the HTTP status code was being set in some of the views. These views are now generating this exception:
Server cannot set status after HTTP headers have been sent.
What has changed from MVC1 to MVC2 to cause this and is there any way to fix this?
© Stack Overflow or respective owner