Method for the push notification messages to reach the website user - push-notification

In terms of websites, How does push notification get displayed ?
Does service workers periodically check the web server for new data and display as notification
or
Server sends message to user based on user IP address or other network details ? in this case website background does not need to check server periodically.

Related

how can Azure Web App receive email SMTP?

My .NET web app presently uses Azure Windows server VM to receive and send SNMP email. My users send email to my web app, and my Windows server VM receives this email into its SNMP and then deposits it into a folder, which gets read by my backend .NET app.
I'm interested in switching to the new Azure web app model, but can't find anywhere how it would receive email.
My DNS provider uses my MX RECORD configuration to forward email from my users to the IP of my present VM server and then to its SNMP receive service, etc.
To receive email with a Web App in Azure App Service, you can setup a Web Job that can poll for new emails on a Schedule or Manual trigger, then perform a custom action necessary.
Another alternative is that you could create an Azure Logic App that is wired up to be notified of email messages. This can be done using the Outlook connectors (if you're using an Outlook email) or other connectors. Then the Logic App can be setup to make an API call to your app to trigger some sort of custom action to take place for emails received.
The configuration you have today on a full VM can not be implemented in Azure App Service Web Apps. The underlying managed VM that hosts the Web App isn't accessible and configurable in this way.

SignalR: Reply to Web Forms client on same machine as web application originating request

I'm looking for a way to support the following process:
Button is clicked in web application running on machine named PC1234.
Call is made to server (either the web server or an API on another server, it doesn't matter) to Do Something.
The server sends a notification to a Windows Forms client installed on PC1234 that the action is complete.
I've got the easy part working using SignalR. I can call a method on the web server and then send a notification with SignalR to ALL clients that the method has completed. The problem is notifying ONLY the client on the originating machine.
My initial plan was to include some unique identifying attribute of the machine with the call to the server which could then be used to direct the SignalR notification back to just that machine, but that doesn't seem to be possible.
An alternative idea was to have the call to the server include a unique reference and also update a file locally (i.e. a Cookie) with that reference, then have the client app poll the Cookie for new references and filter all SignalR messages received for that unique reference. This would be a bit clunky even if it worked, which it doesn't really, not least because I want this to work cross-browser, and different browsers store cookies in different places.
Ultimately this is to support printing locally and silently from a web application. The user selects a document in the web application, hits a print button, the request is sent to the server which retrieves the document from the database, saves it to a network share and sends a notification to a client app on the machine from which the print request was generated. The client app then prints the document from the network share and deletes it.
I never found a way to do exactly what I described in my question, but I came up with an alternative which worked well enough.
In both my web application and my Windows Forms client, the user was logged in with the same Windows credentials. I was therefore able to have the server respond to the button click in the web application by broadcasting a SignalR message to all SignalR clients where the same user was logged in, using
Clients.User(userId).send(message)
See this article for more detailed examples and instructions.
In my Windows Forms client, I included code to track how many instances of the client were connected to the SignalR Hub with the same user credentials and code to handle the receipt of a SignalR message from the server when multiple client instances were connected with the same user details (in my case, this meant displaying a message saying something like "You've requested a print from the web application but you're logged in at multiple workstations. Do you want the document to print here?").

how will my web service identify mspn service

I am making use of microsoft push notification service to push notification from a web service to windows phone app. My doubt is that , how will i pass the message to mspn service (end point)? will we receive any information while we register app to mspn service?
Setting up push notifications has several steps, and to paraphrase the Push Notifications Overview for Windows Phone on MSDN:
Your application registers for push notifications via an instance of the HttpNotificationChannel class
The instance of HttpNotificationChannel does the negotiation with MPNS
Assuming step (2) was successful, the instance raises the ChannelUriUpdated event
You pass the URI in the ChannelUri property to your web service (along with whatever metadata you need to identify what push notifications should be sent to that URI)
Your webservice issues a POST request to the URI passed to it in step (4), with the relevant XML as the message body (that XML will change, depending on the type of notification you're trying to send)
The MPNS servers send that notification to the phone, which will update the Tile, show a Toast notification, or, if it was a RAW notification and your application is running, the HttpNotificationChannel object created in step 1 will raise the HttpNotificationReceived event.
To summarize, and directly answer your question, the endpoint is the URI from the ChannelUri property of your HttpNotificationChannel instance

Push mail API for receiving mails

I would like to know if there is an API which can receive push notifications for an email client.
Use Case: I would like the server to send my web service notifications on new email. I would not like to poll the server. I would like the server to send notification (PUSH) to the web application.
Also, what are the (if any) mail servers that support this kind of API?
Check out Cloudmailin which is a SAS that will do REST post back to your server

How to authenticate an HTTP request to remote server that can be utilize on end user browser?

Details of the problem:
There is one page which is actually a streaming to The Axis IP camera which spits MJPEG output
It requires user to log in with the user name/password promp on browser
I am using this stream to show video directly on a web page
It shows video correctly but asks user to provide correct user name and password set for the camera
I tried to logging in to this camera on server side using HTTP requests and then I realized I authenticated server request not the browser the end user is using.
So what I want is a method server side or client side, that can allow me to log-in to camera automatically when my end-users visit this page.
I am using asp.net with c# 2005
Thanks,
Vipul
One way to do this would be to build a proxy that sits between the user and the camera. For every new connection that comes in from the user, you open a backend connection to the camera and login first before streaming the data out.
Your asp.net page would talk to this proxy.

Resources