I am developing one web application in asp.net 3.5. Now I hv to do push notication with WCF.
I hv successfully developed WCF with callback.
Now my problem arises I cant update web application because the page lifecycle is end.
So please tell me how to update web app.
For further reference plz check this link
Display Messages after getting response from WCF
If it is not possible then wht method should i take. i dont want to use polling because as we except around 800-1000 users are online. so we hv to concerned about the performance as we have only single server.
so plz tell me a good solution and also i want to now how google, yahoo do push notification.
Take a look at the SignalR library. It should get you started in the right direction.
However if you do want to do it yourself, the most efficient method to build this in asp.net is to use a IHttpAsyncHandler and ajax requests.
Here is a complete working project that implements this, along with ajax.
Related
I have a backend .NET 6 Web API RESTful service solution that exposes a complex class which is consumed by a Blazor Server App. Whenever the backend Web API's instantiated class changes values, I need to transmit that changed class to the Blazor app. Currently the Blazor app makes all of the calls to the backend service as would be expected.
I have been attempting to get an EventCallback working to overcome this challenge but it does not work. All of the examples I have found, such as https://blazor-university.com/components/component-events/, include their example within the same Blazor app.
Can somebody please point me in the right direction?
Thank you!
The EventCallback is a struct specifically created to be used in Blazor. It's purpose is to determine the type of the delegate of your event handler.
What you really need is a real time Notification System. It is best implemented through SignalR. Start working on it, and let us know of your difficulties.
Start here
Here's a complete working code sample of SignalR used with Blazor Server App with authentication.
A simpler solution, however, is to create a service that implements a Timer object, to query the database at given intervals.
I have two Projects, an Asp.net WebAPI & a separate Single Page Web Application. My requirement is that when a form is submitted via the web application it is processed at the Web API. Once the Request has been handled successfully i want to broadcast a message to all the clients notifying them that a new request had been submitted.
How can I do it? Any help would be appreciated.
I looked into SignalR, but couldn't find an implementation for this requirement.
Pusher's got libraries you can use to handle anything notifications https://pusher.com/docs/libraries
I suggest you use signalR to cater your requirement. You can go thru this link https://learn.microsoft.com/en-us/aspnet/signalr/overview/getting-started/ for more details.
If your project is small use pusher "https://pusher.com/"
when you use that well It may be cheaper than you make And less resources.
I am building a very simple maintenance app for a website hosted on Azure. I want to display a few details such as website online status (on/off), server location, latest deployment(s) and so forth. So rather then browsing the azure portal I want to see a few things on a single page in the maintenance app.
https://resources.azure.com shows off the azure management API I want to use.
The question is how can I get back a JSON object with information displayed above?
A call would be made at the following url: https://management.azure.com/subscriptions/subscription_id/resourceGroups/Default-Web-NorthEurope/providers/Microsoft.Web/sites/my-website?api-version=2014-06-01
Apart from the API endpoints, the application above doesn't tell me much.
For example how does the authentication object needed looks like (the one used during a GET/POST)? I am building this in C#.
This helped me so far :
http://blogs.msdn.com/b/tomholl/archive/2014/11/25/unattended-authentication-to-azure-management-apis-with-azure-active-directory.aspx.
though I have still having issue on udating it but I'm getting the json data.
I do not know how to explain this in technical terms. So let me begin with an example:
Story
I have an online e-commerce site www.ABCStore.com . I built this using MVC 4 (Razor) in Dot Net.
My friend has a travel agency for which his online site is www.DEFAgency.com . He got it built in Java.
Both our websites were up and running. One fine day I got a call from a company FicticiousServiceProvider and they asked me if I would be interested in getting customer feedback as a functionality on my website without having to write any code myself. What they offered was, I would have to include just a single line of code in the footer of my Masterpage(or layout page) and then the customers who log on to the site would see a small icon on the pages and would be able to provide their feedback.
The feedback will not be available directly to me. The FicticiousServiceProvider guys will analyze the data and provide them to me on a regular basis or on a need basis.
There were other services too which they offered.
I was really happy to have a functionality like that, specially without having to write any code. I tried it and it worked fine in my .Net website. My friend(with a java website) also added a single line to his code and it worked for him too.
My questions here are:
What is this process called ?
If I were FicticiousServiceProvider, how would I have developed this using .Net ? I mean, how to develop a functionality so that a consumer can consume the service using a single line provided by the service provider. Data transfer from my site in the form of feedback to the FicticiousServiceProvider is also happening, without me being able to see anything.
How was it possible for FicticiousServiceProvider to provide the functionality to a .Net app and a java app without any change in the line provided by them?
I have given the description from a consumers perspective. Please suggest from a developer's perspective. Many Thanks.
These things, like Google Analytics tracking code, are usually some kind of javascript injecton. It will use javascript to 'inject' a bit of code that sends a request to their servers (what their server side is coded in is irrelevant really). They then handle the request that includes the information they've gathered in javascript on the client side and store it, then use server side software to analyse that data to give out reports, etc..
So to try and answer your question separately.
I'd call the process javascript injection.
You would have to find the best way to send a request to your servers and handle that request. Could be done with ASP.Net MVC quite easily but any server side technology/code that can handle requests and send data to a store.
They use javascript which is separate to any server side code and works across browsers on the client side.
Could someone please tell me/link me to how I could create a method similar to those posted below:
http://www.vimeo.com/api/docs/upload
http://www.flickr.com/services/api/upload.api.html
(I am providing the links as I'm not sure how to articulate this question without them!)
I'm using C# ASP.NET. IIS 6.
I have an existing web server with other public API methods. I do not want the iPhone user to have to open a web browser, and post to an aspx page. I want the iPhone developer to be able to call my method, and have one of the parameters be a handle to the file which gets POSTed.
Thanks in advance for any help.
You'll need to create a WCF Service Application. You can use this as a webservice that can be exposed to your clients. You can create a RESTful service using WCF where clients can POST video's to.
When searching for 'REST, API, WCF' you'll probably find all the resources you are looking for.