0

Trying Windows Notification Service on the windows 10 desktop.

This line gets 0x880403E8 on "Local Machine" but works perfectly on "mobile emulator".

var channel = await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync();

Turning off windows firewall didn't have any affect. What could be the reason?

dreamfly
  • 381
  • 1
  • 4
  • 12

1 Answers1

0

I cannot reproduce your issue when calling CreatePushNotificationChannelForApplicationAsync to create a channel on my local machine which OS version is build 14393.

You are getting the Ox880403E8 error because the device is not connected to WNS server. There are a number of connectivity failures which get lumped together under the same error message. While you have internet connectivity in general, for some reason you weren't able to get to the channel server. So please make sure the device connected to the internet. If you're developing in an enterprise make sure they're not blocking outbound connections. More details please reference this thread.

More detail about WNS please reference this article.

Community
  • 1
  • 1
Sunteen Wu
  • 10,509
  • 1
  • 10
  • 21
  • Strangely, I just run that app using the just released VS 2017 and it worked on the desktop. oh well... – dreamfly Mar 08 '17 at 06:43
  • All worked for about 20 tries on the desktop and suddenly stopped and giving me the same error code. But again putting it on a windows phone worked perfectly. Frustrating... – dreamfly Mar 09 '17 at 05:39
  • @dreamfly, did you have something for me to test on my side for more than 20 times? Or just run this code 20 times it will throw the error? – Sunteen Wu Mar 09 '17 at 05:44
  • Looks like there is some kind of limit from Microsoft from invoking that method from the same device for too frequently. Supposedly the returned URI will expired in 1 day so we need to reuse it until it expires. That theory seems to hold true as now my VS 2015 has no problem calling that API. – dreamfly Mar 10 '17 at 03:30
  • Wu, I am still having problems with this on W10 desktop. The phone works ok but the desktop is giving me this error. I know if I wait for more than a day on the same desktop it will work again. But for the last few days I have been testing impatiently in less than a day so failing each time. Because I didn't wait long enough, the whatever internal fail timer got reset from each new failure. – dreamfly Apr 03 '17 at 06:51
  • To repeat the error, try running this line quickly, like in a button click event: await PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); The goal is to run it before the first one has a chance to finish. Most likely you will get an error. For me, once gotten the error, I have to wait more than a day to get it working again. – dreamfly Apr 03 '17 at 06:52
  • @dreamfly did you get any solution as today i got the same error `https://stackoverflow.com/questions/48518282/unable-to-get-channel-uri-for-uwp-windows-notification-service` – Hunt Jan 30 '18 at 11:17
  • @Hunt. No I no longer have the problem. – dreamfly Mar 04 '18 at 09:09