title: Custom IActionInvoker and async Action
body: <p>I'm using NInject as the default container and the <a href="http://www.strathweb.com/2012/05/using-ninject-with-the-latest-asp-net-web-api-source/" rel="nofollow noreferrer">NInjectResolver class</a> on an MVC4 project. Injection works great. </p>
  
  <p>Now I'm trying to replace the default <code>IActionInvoker</code> in order to provide custom JSON serialization as shown <a href="https://stackoverflow.com/a/11878694/165656">here</a>.</p>
  
  <p>This seems to work OK if the action returns <code>JsonResult</code> but it chokes on <code>Task&lt;JsonResult&gt;</code> (even if I bind <code>IActionInvoker</code> to the default <code>ControllerActionInvoker</code>).</p>
  
  <p>When I convert it to an async action, the action returns (instead of JSON), this text: <code>System.Threading.Tasks.Task&lt;System.Web.Mvc.JsonResult&gt;</code> - like calling <code>ToString()</code> on it.</p>
  
  <p>How do I go about fixing this?</p>