问题描述
昨天一切正常,但今天当我尝试运行我的代码时,它给了我这个错误:System.AggregateException: 'One or more errors occurred. (Unable to resolve host "api.lokmanecza.com": No address associated with hostname)'
昨天它没有问题,我没有改变任何代码,它给出了那个错误我该怎么办?我试过检查谷歌,但我找不到任何好的答案。请帮我。我能做什么 ?谢谢!
string postUrl = $"http://api.lokmanecza.com/api/GetControlPackageList/1/1";
var stringContent = new StringContent("",Encoding.UTF8,"application/json");
string json = client.PostAsync(postUrl,stringContent).Result.Content.ReadAsstringAsync().Result;
List<LoginApiResponseModel> model = JsonConvert.DeserializeObject<List<LoginApiResponseModel>>(json);
var counter = model.Count;
这是我发布的json代码。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)