Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to communicate between two different WPF application over LAN?

Tags:

c#

wpf

.net-4.0

I want to communicate between two different WPF windows. The WPF UI in first computer generates some data and add to a database table, then it generates a message which includes the unique ID of the new data in the table and forwards it to the another computer. Upon receiving the message with unique ID by same computer, it queries for that data in it and displays in it's UI.

I don't want the WPF application in the second computer to repeatedly (timer based) check the database. Instead I want to have some event listener in this application which just initiates an action upon receiving the message.;

Everything is being operated in LAN where, obviously, two computers are connected within the same network.

A suggestion and better solution will be a great help.

like image 889
user936597 Avatar asked Mar 25 '26 18:03

user936597


1 Answers

Microsoft have provided a framework for this very purpose:

https://msdn.microsoft.com/en-us/library/ms731082(v=vs.110).aspx

WCF has a variety of flavours dependant on your specific requirements, the link above is a good place to begin your research.

like image 152
KingCronus Avatar answered Mar 27 '26 08:03

KingCronus



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!