How to resolve exception : The wait operation timed out. (Exception from HRESULT: 0x80070102)

1

I am getting this exception when calling PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); method. It is working fine on Device, but fails on Local Machine.

This is my code :

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);
            }
        }

I am getting the exception The wait operation timed out. (Exception from HRESULT: 0x80070102). Any help would be appriciated. Thanx

windows-runtime
microsoft-metro
winrt-xaml
wns
asked on Stack Overflow Jul 28, 2015 by Akshay • edited Jul 29, 2015 by Akshay

1 Answer

0

I have resolved the problem by running the above code on device/different machine.

This problem occurred because I have installed various versions of Visual Studios on my machine. Don't know the actual cause of this problem but it works when I upgraded my machine to windows 10.

answered on Stack Overflow Sep 15, 2015 by Akshay

User contributions licensed under CC BY-SA 3.0