WP7 - Add Authentication to Push Notifications - asp.net

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.

Related

How to send request from server side (asp.net web api / mvc ) to xamarin forms app?

i need recommendations from you. I have a project which use web api back end and xamarin forms. Xamarin forms is multi-user apps. Depends to user location it sends post or get request to server side and some actions occur. But what to do when i need to send something to xamarin app from web api without request from it ?????? I mean when some event happen i need to send something like push notification to specific user in xamarin app ???? (like uber send notification to drivers or riders). How to implement this ???? i was thinking to use SignalR but not sure....please help ??? thnks in advance
If your goal is to implement real time communication (when the app is open or running in the background), you could use SignalR. However, SignalR won't allow you to have real notifications mechanism (i.e. getting a push notification when the app is closed and click on it to open the app). Using SignalR, your app UI would get updated if app is open but that's it because SignalR relies on active connections.
If you really want to implement push notifications, you should check the following links:
Firebase Cloud Messaging
Using FCM, app servers can send messages to a single device, to a
group of devices, or to a number of devices that are subscribed to a
topic. A client app can use FCM to subscribe to downstream messages
from an app server (for example, to receive remote notifications).
If needed: How to use it with Azure
Hope it helps!

How to send one signal notification from asp.net webapi to ionic app

I'm developing android and iOS application using cordova ionic and I include one signal notification as a feature in my app.
I register onesignal and test to push notification. It's work well.
Now I want to send onesignal notification from asp.net web api to perticular user.
I have tried this url but I failed. Also i am unable to get device token in my app.
Thank you.
You need to call window.plugins.OneSignal.getIds and store ids.userId from the callback.
You can then make a POST call to the https://onesignal.com/api/v1/notifications endpoint from your ASP.NET code setting the include_player_ids to the userId retrieved from your app.
There is an ASP.NET example towards the bottom of the endpoint documentation page listed below.
https://documentation.onesignal.com/reference#create-notification

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

APNS using ASP .net server in the backgorund

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.

Resources