Windows runtime 如何解决异常:等待操作超时。(HRESULT的例外:0x80070102)
调用PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync()时出现此异常方法。它在设备上正常工作,但在本地计算机上出现故障 这是我的代码:Windows runtime 如何解决异常:等待操作超时。(HRESULT的例外:0x80070102),windows-runtime,microsoft-metro,winrt-xaml,wns,Windows Runtime,Microsoft Metro,Winrt Xaml,Wns,调用PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync()时出现此异常方法。它在设备上正常工作,但在本地计算机上出现故障 这是我的代码: private async void CreateChannel_Click(object sender, RoutedEventArgs e) { var vProfile = NetworkInformation.GetInternet
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)。
任何帮助都将受到感谢。
Thanx我已通过在设备/不同机器上运行上述代码解决了问题。 出现此问题是因为我在计算机上安装了各种版本的Visual Studio。
我不知道这个问题的真正原因,但当我将我的机器升级到windows 10时,它就起作用了 我已通过在设备/不同机器上运行上述代码解决了问题。 出现此问题是因为我在计算机上安装了各种版本的Visual Studio。 我不知道这个问题的真正原因,但当我将我的机器升级到windows 10时,它就起作用了