Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
Hi,
 
I am looking to create a program (.NET) that will sit on some of out clients servers, which will be constantly connected to our server so that we can send commands to it from our side to do numerous things, such as download a file, run an application etc. What would you say is the best way to go about this? I'm thinking sockets as it will give us a lot more control. My boss has suggested web services, where the service would be sitting on our server, but I don't see how that would work as the client would be waiting to hear commands, not send them out (which is how web services work, as I see it)
 
Any ideas?
 
Thanks
 
Rob
Posted 14-Jun-13 0:30am
Comments
Richard MacCutchan at 14-Jun-13 6:09am
   
Your idea sounds like a good way to go. However, there is something called "push technology", which I think use web services. Google can probably find information on it for you.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

With client to server communications there are always a number of approaches.
 
The best approach I've found is to use some of the more advanced binding in WCF.
 
When you create a WCF service in .Net you can assign multiple binding types to the server so you can expose the same service as a TCP/IP network server and web service all at the same time.
 
With client server communications it's always best if the client initiates the handshake as you may find it difficult to get your client to open an incoming port to allow your server to start the conversation with the client.
 
With some of the more advanced bindings in WCF they support something called duplexing. This means the client can establish the connection, but once established the server can push messages out the client as well as the client to the server.
 
Here is a CodeProject article on duplexing with WCF
 
WCF Service Form Hosting and Duplex Communication[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,142
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 14 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100