I solved the problem of downloading data from the server via asp.net web api, and for a start I recommend a simple way.
Try using the full address, for example.
Make sure you are connected to the data.
Make sure you have the correct path (for example, when you turn on Wi-Fi, which goes through the server on which you use WebAPI, and not the full address, but the address of the local server).
Here is a simple code that works in my case (start with a simple one and then move on)
using (WebClient webClient = new WebClient()) { webClient.Encoding = System.Text.Encoding.UTF8; string result = webClient.DownloadString(new Uri("https://webapi.domain.cz/api/root")); }
Majkl
source share