I'm trying to convert some methods to async and have started off with a simple example within the controller I am modifying:
public class MyAPIController : AsyncController
{
public async Task<JsonResult> List()
{
return Json(123456, JsonRequestBehavior.AllowGet);
}
...
}
When I test the method rather than the Json result I get the string value "System.Threading.Tasks.Task`1[System.Web.Mvc.JsonResult]" which I have verified with Fiddler and by browsing.
The project has been manually upgraded to .NET45. Searches suggest that this is possibly a problem with incorrect assembly versions but a check of the project file and Process view suggests that the correct types are referenced and loaded at run time.
Does anyone have any debugging tips for this?
Thanks.