Failing to deliver Azure NotificationHub push messages to (Android) devices from .NET console app
<p>I have configured a .NET App Service using the "Quick Start" instructions in the newer Azure Portal to publish an app service to use as my mobile back end. I have also configured a notification hub for it and am able to send push notifications from a Xamarin.Forms Android app via the Azure mobile back end endpoint. I can also receive the push notification on a registered Android device.</p>

<p>I need to be able to send push notifications to registered devices from a C# console application but no matter what I try, the push messages are not delivered. </p>

<p>I am using the following code to attempt to send push messages. When I run it, the execution ends on...</p>

<pre><code> var result = await hub.SendTemplateNotificationAsync(templateParams);
</code></pre>

<p>...and console app terminates without waiting for the response and the push notification is never delivered to the registered device.</p>

<pre><code>public async void PushSmartAlerts()
{
    string notificationHubName = "DevXXXXNotificationHub";
    string notificationHubConnection = "Endpoint=sb://devXXXXXnotificationhubnamespace.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=SnXXXXXXXXXXXXXXXXXXXXXXXX9N8=";
    hub = NotificationHubClient .CreateClientFromConnectionString(notificationHubConnection, notificationHubName);
    Dictionary&lt;string, string&gt; templateParams = new Dictionary&lt;string, string&gt;();
    templateParams["messageParam"] = "Hello";
        var result = await hub.SendTemplateNotificationAsync(templateParams);
}
</code></pre>

<p>Can anyone tell me what is wrong or if I am going about it the wrong way?</p>