When I invoke below function in a console app, it just works. But when I add the same to a MVC controller, execution never reaches JsonConvert line. Any idea, what I am missing.
Calling code
GetVersion(url).Result.FileVersion
Method
public static async Task<Version> GetVersion(string url, string hostHeader)
{
    var client = new HttpClient();
    if (!string.IsNullOrEmpty(hostHeader))
    {
        client.DefaultRequestHeaders.Host = hostHeader;
    }
    var version = await client.GetStringAsync(url);
    var output = JsonConvert.DeserializeObject<Version>(version);
    client.Dispose();
    return output;
}
 
     
    