6

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?

Community
  • 1
  • 1
Mark Lalor
  • 7,820
  • 18
  • 67
  • 106
  • 1
    Whoever voted to close could you leave a comment so i can make it clearer? – Mark Lalor Aug 17 '11 at 22:40
  • 1
    Yes you can use WCF to do this, but your question is *far* too broad. Try using WCF, then come back with some more questions *if* they haven't already been asked. – Tim Lloyd Aug 17 '11 at 22:45
  • It wasn't me, but the reason selected was "ambiguous, vague, incomplete, overly broad [...]". The question is too broad. Yes, do try WCF - that's probably the easiest. Look for some tutorials - I guarantee you'll find them. [Here's one.](http://msdn.microsoft.com/en-us/library/ms734712.aspx) – Igby Largeman Aug 17 '11 at 22:46
  • 1
    I think they voted to close because your question is too broad. Your are basically asking for the entire solution. In other words, be more especific about what you need, and what problems are you having solving it. – AJC Aug 17 '11 at 22:47
  • When I searched google with exactly "C# .NET communicate between computers over network" no WCF stuff really came up which i think seems to be the best way, you kinda answered the question and when you google it this page will come up to people with the question I had. – Mark Lalor Aug 17 '11 at 22:48
  • I agree the "how can I use WCF" part is broad, I'll look at tutorials and stuff and take that part out, but i think this question can/should be left up – Mark Lalor Aug 17 '11 at 22:49
  • Well, we did answer the "should I try WCF" part, but the **how can I use WCF to do this?** is the main problem with your question. By the way, what you should REALLY do is read up on WCF (search for this site on learning resources) and decide if it is the best course for you, since there are other options. – AJC Aug 17 '11 at 22:52
  • Hehehe... How often does your comment become irrelevant by the time you post it? :) my previous one just did (again, twice in one thread)... Good luck, just recently learned WCF myself, it is pretty cool, quick tip: Its ALL about configuration. – AJC Aug 17 '11 at 22:54

2 Answers2

4

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:

m4tt1mus
  • 1,642
  • 14
  • 24
2

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.

Igby Largeman
  • 16,495
  • 3
  • 60
  • 86
  • http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Creating-Your-First-WCF-Service/ This also seems good to watch – Mark Lalor Aug 17 '11 at 22:54