【问题标题】:How to resolve exception : The wait operation timed out. (Exception from HRESULT: 0x80070102)如何解决异常:等待操作超时。 (来自 HRESULT 的异常:0x80070102)
【发布时间】:2015-07-28 12:43:24
【问题描述】:

我在调用 PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); 方法时遇到此异常。它在设备上运行良好,但在本地计算机上失败。

这是我的代码:

private async void CreateChannel_Click(object sender, RoutedEventArgs e)
       {
var vProfile = NetworkInformation.GetInternetConnectionProfile();
            System.Diagnostics.Debug.WriteLine("InterNetConnectivity==>>" + vProfile.GetNetworkConnectivityLevel().ToString());
            UserResponseTBL.Text = vProfile.GetNetworkConnectivityLevel().ToString();
            if (vProfile.GetNetworkConnectivityLevel() == NetworkConnectivityLevel.InternetAccess)
            {
                var vChannel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();
                string channelUri = vChannel.Uri;
                UserResponseTBL.Text = channelUri;
                System.Diagnostics.Debug.WriteLine("channelUri : " + channelUri);
            }
        }

我收到异常等待操作超时。 (来自 HRESULT 的异常:0x80070102)。 任何帮助都将不胜感激。 谢谢

【问题讨论】:

    标签: windows-runtime microsoft-metro winrt-xaml wns


    【解决方案1】:

    我已经通过在设备/不同机器上运行上述代码解决了这个问题。

    出现这个问题是因为我在我的机器上安装了各种版本的 Visual Studios。 不知道这个问题的实际原因,但是当我将我的机器升级到 Windows 10 时它可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-05-26
      • 2011-08-13
      • 1970-01-01
      • 1970-01-01
      • 2019-03-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多