Windows Mobile 10 后台任务 DNS 失败 [英] Windows Mobile 10 Background Task DNS Fails

查看:31
本文介绍了Windows Mobile 10 后台任务 DNS 失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Windows Mobile 10(版本 10.0.14393.82)上的后台任务遇到问题.在我的后台任务中,HTTP 客户端有时会抛出带有错误的异常(请注意,手机锁定时似乎会发生这种情况):

无法解析服务器名称或地址

手机在解析地址时应该没有问题,因为它在前台运行时可以很好地解析.

有没有其他人看到过这个问题,或者有什么想法?

解决方案

在注册后台任务时检查 IsNetworkRequested 属性:https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.Background.BackgroundTaskBuilder#properties_>

I am running into a problem with my background task on Windows Mobile 10 (build 10.0.14393.82). In my background task, HTTP client is sometimes throwing an Exception with the error (note it seems to happen when the phone is locked):

The server name or address could not be resolved

The phone shouldn't have an issue resolving the address, since it resolves it fine when running in the foreground.

Has anyone else seen this issue, or have any ideas?

解决方案

check the IsNetworkRequested property when registering your background task: https://docs.microsoft.com/en-us/uwp/api/Windows.ApplicationModel.Background.BackgroundTaskBuilder#properties_

这篇关于Windows Mobile 10 后台任务 DNS 失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆