Azure Push Notification REST No Service is Hosted at the Specified Address

亡梦爱人 提交于 2019-12-11 11:27:55

问题


I am using Azure mobile services to do Push Notifications. I have a push notification service bus created. When I try to connect to that through a REST service I get the following response:

404No service is hosted at the specified address. TrackingId:dfc9aea1-e229-4eb7-b393-c8cd6bce258d_G19,TimeStamp:11/3/2014 8:39:21 PM

The POSTMAN request looks like so which duplicates the problem:

How do I further troubleshoot this because the service is there? What am I missing?


回答1:


A reference to the above API can be found here: http://msdn.microsoft.com/en-us/library/azure/dn223266.aspx

After troubleshooting with Microsoft we found the problem to be two-fold.

The Connection String key you should be using is found on the hubs page. Named DefaultFullSharedAccessSignature.

The next thing is the hub name shouldn't be the namespace. In my URI…

https://qb-alphahub-ns.servicebus.windows.net/qb-alphahub-ns/messages/?api-version=2013-10

Should be

https://qb-alphahub-ns.servicebus.windows.net/qb-alphahub/messages/?api-version=2013-10




回答2:


I had the exact same issue when sending requests via Python and Postman.

I tried the above solution with no luck. My issue ended up being two-fold as well:

  1. My namespace was named the same as my notification hub. Had to rename my hub.
  2. I had to add an extra header to the POST: "X-WNS-Type": "wns/toast"

After making the changes, my toast notifications started working with successful responses from the Notification Hub web services.



来源:https://stackoverflow.com/questions/26720098/azure-push-notification-rest-no-service-is-hosted-at-the-specified-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!