Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# .NET communicate between computers over network [closed]

How should I go about making an application with C# and .NET where, say, on one computer a button is pressed that triggers an event on the other?

I saw this:

Recommended way to communicate between processes running on different computers on the same network

I've never heard of WCF, is that what I should try?

like image 794
Mark Lalor Avatar asked Aug 17 '11 22:08

Mark Lalor


2 Answers

You're question is way to broad however I can give you a brief overview of how WCF (and most client/server apps) work.

You create a WCF service and then you reference the WCF service (in VS right click references then add service reference) inside your client application. The click in the client application will send a message to the WCF service that will deal with that message.

As mentioned the getting started guides are pretty decent. The WCF Test Client is a great debugging tool as well. If you open the Visual Studio command prompt and type wcftestclient, it will pop up.

Here are some articles that might be helpful:

  • http://msdn.microsoft.com/en-us/netframework/aa663324.aspx
  • http://msdn.microsoft.com/en-us/library/dd936243.aspx
  • http://msdn.microsoft.com/en-us/library/aa751792.aspx
  • http://blogs.msdn.com/b/tess/archive/2009/01/09/net-hang-my-application-hangs-after-i-called-my-wcf-service-a-couple-of-times.aspx
  • http://blogs.msdn.com/b/wenlong/archive/2009/07/26/wcf-4-higher-default-throttling-settings-for-wcf-services.aspx
  • http://merill.net/2008/10/wcf-performance-optimization-tips/
like image 82
m4tt1mus Avatar answered Sep 30 '22 01:09

m4tt1mus


Yes, I would use WCF, because I know it's pretty easy to get a simple project running with WCF, and that will give you confidence to build on it. (Having said that, I dont have much experience with any other networking technologies.)

Start with this Getting Started tutorial.

Then if you have more specific questions, ask them.

like image 23
Igby Largeman Avatar answered Sep 30 '22 01:09

Igby Largeman