Xamarin.forms Xamarin应用程序中的错误连接超时

Xamarin.forms Xamarin应用程序中的错误连接超时,xamarin.forms,Xamarin.forms,我正在使用flurl.http调用xamarin.forms中的api async void CallInspectiontype() { IList<dynamic> list = await "http://192.168.xxx.xx:8085/api/QMSon/GetInsp".GetJsonListAsync(); var modelList = new List<string&g

我正在使用flurl.http调用xamarin.forms中的api

 async void CallInspectiontype()
        {
            IList<dynamic> list = await "http://192.168.xxx.xx:8085/api/QMSon/GetInsp".GetJsonListAsync();
            var modelList = new List<string>();
            foreach (var item in list)
            {
                modelList.Add(item.Text);
            }
            InspectionTypePicker.ItemsSource = modelList;

        }
异步void CallInspectiontype()
{
IList列表=等待“http://192.168.xxx.xx:8085/api/QMSon/GetInsp“.getJSonListSync();
var modelList=新列表();
foreach(列表中的变量项)
{
modelList.Add(item.Text);
}
InspectionTypePicker.ItemsSource=modelList;
}
它运行得更早,但不是现在!我不知道为什么会这样?
Flurl.Http.FlurlHttpException:发生

我解决了它的问题我以管理员身份运行visual Studio并检查internet连接这对我来说很好

我解决了这个问题,我以管理员的身份运行了visual Studio并检查了internet连接,这对我来说很好

我有更新的问题!到底什么东西没有运行?你调试代码了吗?它在哪里中断?如果你得到一个超时,你的客户端和服务器之间通常会出现连接问题,它在笔记本电脑上运行,但当我在移动连接上调用它时超时!它在调用api的地方中断!我有更新的问题!到底什么东西没有运行?你调试代码了吗?它在哪里中断?如果你得到一个超时,你的客户端和服务器之间通常会出现连接问题,它在笔记本电脑上运行,但当我在移动连接上调用它时超时!它在调用api的地方中断!