title: ASP.NET+Azure 400 Bad Request doesn't return JSON data
body: <p>There is an action in my ASP.NET MVC controller that returns JSON data with a 400 Bad Request when invalid parameters are passed to the action.</p>
  
  <pre><code>[HttpDelete]
  public ActionResult RemoveObject(string id) {
      if(!Validate(id)) {
  
          Response.StatusCode = (int)HttpStatusCode.BadRequest;
          return Json(new { message = "Failed", description = "More details of failure" });
      }
  }
  </code></pre>
  
  <p>This works perfectly running under IIS or with the development test server launched from Visual Studio.  After the project has been deployed to Azure the 400 Bad Request comes back without the JSON data.  The content type has changed to 'text/html' and 'Bad Request' for the message.</p>
  
  <p>Why is the behavior different under Azure?</p>