【发布时间】: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