title: Status Code is 200 but still error event fires in ajax call to MVC web API
body: <p>I am posting some strings on a MVC based web api using [FromBody] which is working fine. Data is adding in database. My Controller's Action method type is HttpResponseMessage and i am returning this response </p>
  
  <pre><code>HttpResponseMessage response = Request.CreateResponse(HttpStatusCode.OK, "value"); 
  return response;
  </code></pre>
  
  <p>but error event is firing instead of success.</p>
  
  <p>Here is the ajax call.</p>
  
  <pre><code>$.ajax({
      type: 'POST',
      url: 'http://businessworxapi.azurewebsites.net/api/SaveTemplate',
      contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
      dataType: "text json",
      data: "RetailerID=" + encodeURIComponent(retailerid) + "&amp;SvgContent=" +
              encodeURIComponent(stringsvg) + "&amp;Description=" +
              encodeURIComponent(Description) + "&amp;TemplateName=" +
              encodeURIComponent(Name),
      beforeSend: function () {
      },
      success: function (response) {
          alert("Added");
      },
      error: function (xhr, ajaxOptions, thrownError) {
          alert(xhr.responseText);
      }
  });
  </code></pre>
  
  <p>Suggest me something to solve this issue.</p>