Wierd exception with WebClient

Alexander Blohmé 1 Reputation point
2022-11-08T11:29:25.167+00:00

Hello, if the domain is wrong when doing a WebClient DownloadStringAsync I get this exception (see image):

258301-screenshot-2022-11-08-at-122535.png

I try to add the: try catch exception inside the webclient function that I use, but it still hits at ApplicationMain, how can I make thsi better so I can display a warning to the user instead of making the app crash?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,000 questions
{count} votes