How to Refresh DNS or Remote Host for Notification Hub Namespace after the Subscription is renewed

Veez 0 Reputation points
2023-11-10T07:30:28.72+00:00

I am new to Azure Notification development. I created multi platform app (android and iOS) that uses push notification. I applied Azure Notification Hub to handle messaging for push notification.

I got notification where the subscription has reached its maximum credit usage. It caused the notification hub namespace to be disabled. The subscription has been renewed, the hub namespace has been re-enabled using Azure CLI command. However, when I tried to send push notification, it throwed exception:

Microsoft.Azure.NotificationHubs.Messaging.MessagingCommunicationException
  HResult=0x80131500
  Message=The remote name could not be resolved: '[notification-hub-namespace].servicebus.windows.net'.TrackingId:adc50dbf-ad4d-4a54-aaf4-2b755b6d9158,TimeStamp:10/11/2023 1:19:48 AM
  Source=Microsoft.Azure.NotificationHubs
  StackTrace:
   at Microsoft.Azure.NotificationHubs.Common.ExceptionDispatcher.Throw(Exception exception)
   at Microsoft.Azure.NotificationHubs.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
   at Microsoft.Azure.NotificationHubs.NotificationHubManager.EndSendNotification(IAsyncResult result)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic(IAsyncResult iar, Func`2 endFunction, Action`1 endAction, Task`1 promise, Boolean requiresSynchronization)
--- End of stack trace from previous location ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
   at Plugin.Services.Push.Controllers.PushNotificationsController.<BroadcastNotification>d__19.MoveNext() in [C# code path] 438

  This exception was originally thrown at this call stack:
    [External Code]

Inner Exception 1:
WebException: The remote name could not be resolved: '[notification-hub-namespace].servicebus.windows.net'

I am looking for function/feature in portal azure to reset the DNS or something, but couldn't find any. I am looking solution to fix this notification hub issue without creating new resource/new notification namespace.

Is there a way to reset the DNS for notification namespace after subscription renewal?

Azure Notification Hubs
Azure Notification Hubs
An Azure service that is used to send push notifications to all major platforms from the cloud or on-premises environments.
264 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. brtrach-MSFT 15,256 Reputation points Microsoft Employee
    2023-11-11T20:03:07.45+00:00

    @Veez I understand you are having issues with getting your Azure Notification Hub back online after your Azure subscription was disabled. I have helped a few customers in the past with similar issues and below are what I would suggest trying.

    1. Check the Namespace: Ensure that the namespace you’re using is correct and active. You can check the availability of the namespace using the Azure CLI command az notification-hub namespace check-availability.
    2. Regenerate Keys: Sometimes, regenerating the keys for the namespace authorization rule can help. You can do this with the Azure CLI command az notification-hub namespace authorization-rule regenerate-keys.
    3. Minor Change to Namespace: Some users have reported that making a minor change to the namespace and then changing it back can help to reset the state of the resource.
    4. Check for Proxy Issues: If your server is behind a proxy, it might be blocking the connection. You may need to configure your server to bypass the proxy for Azure connections.
    5. Upgrade the Namespace: Upgrading the namespace to a higher tier and then testing can sometimes resolve issues.

    If the above 5 steps do not work, please reply back here so we can assist you further.