I need to be able to respond to requests with a http status code of 204 but appharbor is only returning a 500 error. My controller code is executing correctly but when the code below is called, I only see a 500 error in fiddler.
protected ViewResult HttpNoContent()
{
Response.StatusCode = (int)HttpStatusCode.NoContent;
return View("NoContent");
}
Quote from the specification (I have put the important part in bold):
You are not respecting this rule. 204 status code means no content and yet you are returning a view. Try returning an EmptyResult: