Click here to Skip to main content
15,890,845 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi there
im planning to create a windows application and webservice and website
and i have to send some data [as command] to windows application.
so first i have to know that the win app is up and runnig , second i have to send data to it
i know how to send data from win app to webservice but i donno how to sendit from webservice to app. all works that i done before is sending data from win app to webservice and get the result, but this one , i donno what to say. can you please help me?!
Posted
Comments
Sergey Alexandrovich Kryukov 6-Sep-13 2:11am    
Normally, both Web service or Web site always send data to the client, but on the client request, which is the HTTP request. So, what's the problem?
—SA
nariman008 6-Sep-13 3:03am    
the problem is that, how to send data from webservice to windows app without requesting from windows app. i mean that without doing any thing on windows app , we have to receive data from webservice. for example one of my users named XY , and my website named XYZ.com(for example) so we have a service that allow users to send note to their computers via website(from another place) so XY is connected to website from coffee net and want to send some note to his home computer [that is on and the win app is installed on it] , so here what should i do to send that note to his computer?

1 solution

You are asking about an important feature which is unfortunately not so easy to implement with HTTP, which is primarily build for pure client-server paradigm, when everything happens on request from client side: a client sends HTTP request, and get HTTP response from server.

This is called pull technology. It is really a draconian limitation. Even such a basic thing as a Web chat suffers greatly from such limitation. A client has to constantly poll the servers for new events on the char, which is wasteful and not responsive enough from at the same time. What you really need is so called server push. Please see:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^],
http://www.asp.net/signalr[^],
http://signalr.net/[^].

SignalR referenced above is a new ASP.NET library implementing server push.

—SA
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900