Question

I have to developed one application:-

Which will have two part ADMIN and Clients

Components of application:-

1) WCF Services:-To capture the screen's images of all clients machine through some sort of UI (say button "Capture")

2) Clients: - This will be any exe run on different machine and consuming WCF services.

So as per architecture:-

1) All clients .exe will subscribe to WCF service, so that the channel is established between client and service Using this channel service should enable callback (instruct) to all clients (.exe on different machine) to capture the desktops image And save it in some particular location.

Thing I know:-

1) This can be achieved with Callback mechanism in wcf.

Things I am looking for:-

How and where to generate the event so that all clients are instructed to capture desktop image.i.e how to use wcf service in some sort of UI (say button)"Capture”. When admin click on capture button the event should raise to all the clients to capture the screen.

Please help how to perform this task with WCF callback

Was it helpful?

Solution

Actually, you have given the answer yourself already. The admin needs to use a UI to trigger the event. So this UI is yet another client for the WCF service. Your service needs to be configured as InstanceContextMode.Single in order to have only one instance with the shared state (i.e. the list of registered clients). You will have to think about concurrency as well when you have shared state. The button in the admin UI can then trigger a method in the same WCF service that will use the callbacks to notify the clients.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top