title: Web Api 2 string response returns as an array of characters
body: <p>I have this Controller method:</p>
  
  <pre><code>[HttpGet]
  [Route("SystemCheck/PulseCheck")]
  public HttpResponseMessage PulseCheck()
  {
      //this is a string
      var pulseCheck = PulseCheckHelper.PulseCheck();
      var response = Request.CreateResponse((HttpStatusCode.OK), pulseCheck);
      return response;
  }
  </code></pre>
  
  <p>The response comes back as:
  [
      "2",
      "2",
      "9",
      "9"
  ] instead of "2299"</p>
  
  <p>Any ideas? </p>
  
  <p>I have also tried different variations like:</p>
  
  <pre><code>[HttpGet]
  [Route("SystemCheck/PulseCheck")]
  [ResponseType(typeof(string))]
  public string PulseCheck()
  {
      //this is a string
      var pulseCheck = PulseCheckHelper.PulseCheck();
      return pulseCheck;
  }
  </code></pre>
  
  <p>But same results. Is there any WebApiConfig I'm missing. I have other applications that work fine with the same controller method code but haven't been able to identify the configuration differences.</p>
  
  <p>This is in my WebApiConfig:</p>
  
  <pre><code>    public static void Register(HttpConfiguration config)
      {
          config.Formatters.JsonFormatter.SerializerSettings.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
          config.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Serialize;
          config.Formatters.JsonFormatter.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
  
          config.MapHttpAttributeRoutes();
  
          config.Routes.MapHttpRoute(
              name: "DefaultApi",
              routeTemplate: "api/{controller}/{id}",
              defaults: new { id = RouteParameter.Optional }
          );
  
          config.MessageHandlers.Add(new Security.WebApi.AuthenticationHandler());
          config.Services.GetFilterProviders().ToList().ForEach(provider =&gt; config.Services.Remove(typeof(System.Web.Http.Filters.IFilterProvider), provider));
          config.Services.Add(typeof(System.Web.Http.Filters.IFilterProvider), new OrderedFilterProvider());
          config.Filters.Add(new ExceptionHandlingAttribute());
          config.Filters.Add(new InspectActionContextFilter());
          config.Filters.Add(new NewRelicFilter());
          config.Filters.Add(new EnableQueryAttribute
          {
              PageSize = DefaultPageSize,
              EnsureStableOrdering = false
          });
      }
  </code></pre>
  
  <p><strong>Update:</strong> Seems like the culprit is the following code in WebApiConfig Register:</p>
  
  <pre><code>    config.Filters.Add(new EnableQueryAttribute
      {
          PageSize = DefaultPageSize,
          EnsureStableOrdering = false
      });
  </code></pre>
  
  <p>This is enabling OData queries for all Controller methods. If I remove those lines then I get the right response back "2299". Now my question is, how can I disable OData for my specific controller method?</p>