Click here to Skip to main content
13,005,198 members (60,831 online)
Rate this:
Please Sign up or sign in to vote.

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?


Posted 13-Jun-13 23:30pm
Richard MacCutchan 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
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[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170627.1 | Last Updated 14 Jun 2013
Copyright © CodeProject, 1999-2017
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