Unhandled Exception: System.FormatException: <Timeout Error

Mar 9 2020 9:59 AM
Hi Guys,
 
I trust you are well.
how to sort out the following error in xamarin android( Time out break mode).
When calling HttpClient 
It works fine on emulator but on real device it goes on Break mode (Unhandled Exception: System.FormatException: <Timeout Error)
 
My C# code:
 
//Calling Web API
var HttpClient = new HttpClient();
var response = await HttpClient.GetStringAsync("https://...MyUrl");
var hourlyList = JsonConvert.DeserializeObject<List<Forecast>>(response);

Answers (4)