title: Error converting value "Any Value" to type 'System.Web.Http.IHttpActionResult'
body: <p>I'm getting this error when I call a <code>Web API</code> method that returns a <code>bool</code> (<em>EDIT - any object, the error comes from the Hub attribute</em>):</p>
  
  <blockquote>
    <p>Error converting value True to type 'System.Web.Http.IHttpActionResult</p>
  </blockquote>
  
  <p>This is the method:</p>
  
  <pre><code>    [HttpGet]
      [Hub(Name = "ServiceLog", IncomingMethod = "logIncoming", OutgoingMethod = "logOutgoing")]
      [ResponseType(typeof(bool))]            
      public async Task&lt;IHttpActionResult&gt; TestMethodAsync(int i)
      {
          var result = await _repository.TestMethodAsync(i).ConfigureAwait(false);
          return Ok(result);
      }
  </code></pre>
  
  <p>EDIT: This is the offending code in the Hub attribute:</p>
  
  <pre><code>public override async void OnActionExecuted(HttpActionExecutedContext actionExecutedContext)
      {
       ...    
          if (hub != null)
          {
              // THIS LINE THROWS THE ERROR
              var response = await actionExecutedContext.Response.Content.ReadAsAsync(actionExecutedContext.ActionContext.ActionDescriptor.ReturnType);
              hub.Clients.All.Invoke(OutgoingMethod, new { Time = DateTime.Now.ToString("G"), Data = response });
           }
      }
  </code></pre>
  
  <p>From Fiddler and browsers, I get back a 200 response and the correct return value, but Visual Studio throws an error.  What is causing this error?</p>