locked
[WP8.1]Unable to send WNS notification RRS feed

  • Question

  • Trying to send WNS notification to a WP8.1 device using the Azure notification hub. Have made a new app in the Windows store and successfully entered the Package SID and client secret in the Notification hub 'configure' section. Precisely followed all the steps, given here : https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-windows-store-dotnet-get-started/

    Now whenever i try to send the notification from Azure dashboard, it says  : 'The Token obtained from the Token Provider is wrong' , i have checked multiple times the SID & client secret for the correctness and its all fine  , also tried creating new app/new notification hub but all in vain, it never sends the WNS notification to the device and if notification is sent from back-end code, it gets executed successfully but no notification is received(probably the same error about Token)

    PS: same is the case with GCM notifications as well. 


    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Thursday, June 25, 2015 7:42 AM

Answers

  • Now all the app names reserved in the app store(Windows & Windows Phone) are visible through the 'Associate with the store' in Visual Studio . Seems it was some sync error of store with Visual Studio plus i am able to send WNS notifications as well.

    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Friday, July 3, 2015 10:36 AM

All replies

  • Hi,<o:p></o:p>

    Sorry to hear this. This happens if you didn't associate your project with app in AppStore. Could you make sure
    that your app is really associated app in AppStore (step 4 to 6 in https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-windows-store-dotnet-get-started/)<o:p></o:p>

    You can also verify by examining the Package.appxmanifest in your project.<o:p></o:p>

    Thanks,
    Sateesh


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    • Proposed as answer by Mimi Xu Tuesday, July 7, 2015 8:30 PM
    Thursday, June 25, 2015 5:51 PM
  • Thanks for the reply. But as i said this is a Windows Phone 8.1 app(not universal or windows 8.1), so when i go to store association from Visual Studio, it takes me to the Windows Phone app store(where obviously i cannot see the app i created ) and not Windows Store where the app is created. Does this association is necessary as i already have entered the app credentials(SID and client secret) in the Azure dashboard manually.

    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Friday, June 26, 2015 5:34 AM
  • Another thing i noticed is, if an app name is reserved in the Windows Store dashboard then that app(name) isn't  visible in the visual studio when we try to associate that app( only the names of apps which are published is visible) , though if an app name is reserved from the visual studio itself then that app name is visible( but then that is not visible in windows store dashboard)


    • Edited by Vineet24 Friday, June 26, 2015 6:59 AM
    Friday, June 26, 2015 6:50 AM
  • Hi,

    Seems like a bug in Visual Studio. Association of your project to a app in dev center is necessary. You can manually configure association to store, by inserting the identity element into Package.appxmanifest file.

    You fill find this tag as “Application Identity” in App Settings tab in “Dev Center for Windows Store apps”.  It looks like something like this.

    <Identity Name="***********" Publisher="CN=**************" />

    Thanks,
    Sateesh


    Mark Post as helpful if it provides any help.Otherwise,leave it as it is.

    • Proposed as answer by Mimi Xu Tuesday, July 7, 2015 8:30 PM
    Friday, June 26, 2015 5:13 PM
  • Tried inserting the Identity tag manually(took the Application Identity from test app created in the Windows App store) in the package.appxmanifest file and then ran the application. Again, the registration to Azure was successful but as soon as push message is sent from Azure dashboard, it says the same message :  'The Token obtained from the Token Provider is wrong'

    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Monday, June 29, 2015 8:58 AM
  • I have tried multiple times the process listed in the steps 4-6@ https://azure.microsoft.com/en-us/documentation/articles/notification-hubs-windows-store-dotnet-get-started/

    One doubt which i still have (if its a Visual Studio bug then its fine) : If i reserve an app name on Windows Store account , then should that app name be visible in the 'Associate app' tool of Visual Studio or not as currently its not but as per the Azure link above, the app name just reserved on store is visible through the Visual Studio.

    Tried this on various versions of Visual Studio(VS2013 Express update 4, VS2013 Ultimate & on VS2015 RC) but in none of them the reserved app name if visible.


    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Monday, June 29, 2015 10:00 AM
  • Apologies for the duplicate thread but i am too curious to know about the issue i have raised here :

    https://social.msdn.microsoft.com/Forums/azure/en-US/6e8ef2e5-e457-4312-9c3b-7683bb735ca2/wp81unable-to-send-wns-notification?forum=notificationhubs  

      -  specifically the last(post) concern raised plus i am looking forward if someone can try the same at their end.


    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8


    Tuesday, June 30, 2015 5:23 AM
  • @Rob : Not many people visit 'Azure Notification Hub' forum and that is the reason i created another thread with same issue, so it would be good if the merged thread be visible in the 'Developing Universal Windows apps ' section.

    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Tuesday, June 30, 2015 6:08 AM
  • Now all the app names reserved in the app store(Windows & Windows Phone) are visible through the 'Associate with the store' in Visual Studio . Seems it was some sync error of store with Visual Studio plus i am able to send WNS notifications as well.

    http://developer.nokia.com/community/wiki/Using_Crypto%2B%2B_library_with_Windows_Phone_8

    Friday, July 3, 2015 10:36 AM