You have to use in the following way. Let me know
public async Task<ActionResult> loaddata()
{
List myListDisp = await WsdlCompareAsync();
return Json(new { data = myListDisp }, JsonRequestBehavior.AllowGet);
}
private async Task<List> WsdlCompareAsync()
{
string userName, token, scopePath, apiVersion, defaultCollectionUrl, firstEnvironmentToCompare, secondEnvironmentToCompare;
GetConfiguration(out userName, out token, out scopePath, out apiVersion, out defaultCollectionUrl, out firstEnvironmentToCompare, out secondEnvironmentToCompare);
WsdlDiff diff = new WsdlDiff(defaultCollectionUrl, userName, token, scopePath, apiVersion);
return await diff.Compare(firstEnvironmentToCompare, secondEnvironmentToCompare);
}