Reputation: 23
I am using VS2010 - C# - WPF I have a desktop application that I built, and this application shows some values. these values are brought from a web page that I made too.
Now everytime I change the values on the webpage the values must be changed on the applications.
But I don't want the applications to keep refreshing because the refresh rate is low, so I want the webpage to notigy all apps. on a button click from the website.
is such thing possible ? knowing that anyone can download the application but no one can access the website but me ?
Upvotes: 2
Views: 3799
Reputation: 12528
I will consider your problem as an academical one of "How to get the server to push notification to the client" and answer, but I think the better, and more common solution is for the client application to do polling on a server endpoint, and update itself, as Tejs says.
As for the question, You have to
Top issues you will face are, problems like what to do if client does not respond, how to maintain the list - in-memory or in-DB and so on.
Upvotes: 2
Reputation: 41236
There's not going to be any kind of magic here; it depends on your update interval. If you want them to just get the freshest value on the applications first start, then you can simply make the web request in the application load method. Otherwise, you will need to implement some kind of polling for updates in your application, just on a long interval (say 2 hours between each request, etc).
Upvotes: 0