APNS using ASP .net server in the backgorund - asp.net

I am new to implement Push notification services. I am implementing an application with push notification services. At the server end we are using .net coding and using moon app code to send notifications to devices. My problem is i am getting notifications when we use developer certificate (p12 file) when we host it I am unable to get the deivces. We also tested this with production (p12 file) certificate. Event though I am not getting the notifications. Can you guys suggest me the flow implementation and requirement that we need before hosting it.
Thank you,
Sekhar.

Make sure below step is correct.
var push = new PushNotification(false, "p12 file location","password");
//true-sandbox and false-production.
If not above then something wrong in Ur p12 certification.

Related

xamarin.forms push notifications server side

I implemented the .p12 Certificate for APN(Apple Push Notification) to my Windows Server.
Now I have an xamarin.forms App where i downloaded the Plugin.PushNotification.
I implemented in AppDelegate.cs RegisteredForRemoteNotifications, FailedToRegisterForRemoteNotifications and DidReceiveRemoteNotification Methods.
My question is, which Project (MVC, ASMX..) should I create on Server Side to send notifications to the Users who installed the App.
Furthermore I have an Portal programmed which is on this Server too. In this Portal I can send an message to the App too. But which Service do i Need ?
Thanks
No programming required at all :) Use https://onesignal.com for free, unlimited apps & notifications for iOS/Android + Web Push
In my WebApp I used PushSharp to send Notifications to different devices.
In my App I use Plugin.PushNotification and it works like a charm.
using push sharp for sending push notifications through FCM

Read Notification via web

I want to implement a push notification service. The idea is to use the GCM Service. Is it possible to read the notifications both via web app (the app is written in php using laravel) and via mobile app for the authenticated users using the same technology?
I think it is possible, I also see this tutorial that can help you to achieve that. It also use PHP as a sample, so it seems like your work will be easier:)
It explains here the basic steps that you need to achieve push notification. It has a sample code and a screenshot to make you understand more the content of this tutorial.
In developing this application, it involves two parts, a GCM Server Application that create Web application using Php to send message to User via GCM Cloud server and GCM Client Application that create Android application which receive messages sent from GCM Server Web App.
For more information you can also check this links:
Implementing Push Messaging for Chrome
How to send push notification to web browser?

Application insights slack integration

I've recently started using application insights with a web api.
It will be really helpful to configure app insights to post error messages in a slack channel.
I've seen there is a slack connector but I am not sure how to use it, my guess is that this can be solved with the slack connector and a azure logic app, any tips? tutorials?
You may have a look at this link: https://github.com/Azure/azure-quickstart-templates/tree/master/demos/alert-to-slack-with-logic-app. I followed the instruction and it worked for me.
The tricky part is you need to click the "Deploy to Azure" button on this link page. It would redirect you to Azure Portal, and you will need to specify which channel you want the alert message to be sent e.g. #somechannel. Don't use direct message like #yourname, it has some problem with that and the logic app couldn't deploy for me.
Then you just follow the instruction to find the deployed logic app and authenticate it by logging into slack. And you also need get the logic app URI from the deployment output as in the instruction. Once you put the URI into the alert webhook, you are ready to go!
It's relatively easy to set up a slack webhook.
There's a pretty good C# nuget package for this at https://github.com/nerdfury/Slack.Webhooks
Although you'd need to set up a seperate service to poll and route the app insights data.
There's also commercial options.
getcloudbot.com allows you to hook your Azure Application Insights bundle directly into your slack channel. It's good at staying on top of your services.
Disclaimer : I run it.
You can configure an alert for your error messages https://azure.microsoft.com/en-us/documentation/articles/app-insights-alerts
And then configure sending to Slack using web hooks: https://code.msdn.microsoft.com/Create-Azure-Alerts-with-b938077a
Another quick solution to this, which doesn't involve additional code or a logic app, is to set up a Slack email integration, which provides you an inbound email address for a given channel. You can use that in Application Insights in the "Additional administrator email(s)" field.
This isn't perfect, as you don't really get a lot of details in the post to slack, but it will notify you and provide the name of the alert.
The most easiest path that I found to integrate was using an app named Slack Email which sends email alerts to slack. Once you subscribe this email id to alerts in Application Insights it will start sending the messages on the specific channel you have linked the email to.
https://teamesub.slack.com/apps/A0F81496D-email

How to convert an ASP.NET/PushSharp project to Azure to send push notifications?

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):
//ASP.NET + PushSharp
AppleNotification notification = new AppleNotification(PushToken).WithAlert(message);
broker.QueueNotification<AppleNotification>(notification);
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 Windows Azure ServiceBus Push Notifications APNS Architecture 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.
I'm not sure what kind of object a PushToken is. The way Notification Hubs work is, rather than providing a one-to-one messaging model (where you must identify each and every recipient of the message, whether that is by channel, device token, or registration ID), it provides a tag-based model. However, this does not mean that tags can't be unique to individual users, and in fact you can used just about any token as a tag.
This is a new model, unlike Azure Mobile Services or direct use of APNS, so it's not likely to be directly portable from your existing code. But, in my opinion, the Notification Hubs model is simple once you understand tags. It supports native payloads (constructed by the server that is sending the notifications) and template payloads (where the template is constructed by the receiving device and provided to Notification Hubs at registration time, and then parameters in the template are supplied by the server when it sends the notifications to the templates).

WP7 - Add Authentication to Push Notifications

I am looking to add authentication to my WP7 application. I currently have simple, unauthorized push notifications working thanks to this MSDN sample.
I am having difficulty figuring out exactly what I need to change in my code in order to get authentication. I have read this MSDN article and know I need to get a TLS certificate uploaded to the App Dev website (in progress) and get some info from it once it's verified.
Thanks for reading/helping!
If you mean code to change in your WP application, you shouldn't have to change anything. Authentication simply changes the way your web service communicates with the Microsoft Push Notification Service, rather than how the Microsoft Push Notification Service communicates with your app on the phone.

Resources