title: How to convert an ASP.NET/PushSharp project to Azure to send push notifications?
body: <p>I've been using ASP.NET and PushSharp to send push notifications to my iOS app clients with the simple following code (after certificate configurations etc):</p>
  
  <pre><code>//ASP.NET + PushSharp
  AppleNotification notification = new AppleNotification(PushToken).WithAlert(message);
  broker.QueueNotification&lt;AppleNotification&gt;(notification);
  </code></pre>
  
  <p>This worked perfectly on isolated hosts running classic IIS/ASP.NET but now I'm moving towards Windows Azure. When I try this code on Windows Azure, notifications sometimes fail to send, and restarting the website (Standard mode) helps. However, since this is an unreliable approach I've decided to move to Azure's Notification Hub service. I've created the hub, uploaded my certificates, started coding but I couldn't find the equivalent of my previous code. I don't need to broadcast messages to all users, I need to send a push notification to a single device, given that I have the push token. I've looked at <a href="https://stackoverflow.com/questions/21323712/windows-azure-servicebus-push-notifications-apns-architecture">Windows Azure ServiceBus Push Notifications APNS Architecture</a> but the link provided at the answer is extremely confusing and I couldn't understand it. How can I, simply push a message to a push token on Windows Azure? Do I have to use notification hub? (I don't use a VM) Any simple approach is welcome, pure ASP.NET/PushSharp-based approach is preferred as I don't need to change my whole codebase.</p>