Azure Push Notification REST No Service is Hosted

2019-08-05 09:43发布

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: enter image description here

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

2条回答
闹够了就滚
2楼-- · 2019-08-05 10:19

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

enter image description here

查看更多
干净又极端
3楼-- · 2019-08-05 10:28

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.

查看更多
登录 后发表回答