C# WCF multiple clients

4.7k Views Asked by At

I have made a WCF service that make changes to SQL database.

There is one client connected, that have one listbox showing data from that database.

Also, in the client app, there is one textbox and one button. With button click, string from textbox is added to database and to listbox also.

But when I connect multiple clients, only client that make changes can see them in listbox.

When I reopen some other client again, that newly made string are added to listbox.

How can I have those changes in all client's listboxes in realtime?

1

There are 1 best solutions below

0
On

You will have to create a duplex communication contract, so that the server can send messages to connected clients.

For example: A-Beginners-Guide-to-Duplex-WCF