Is possible to send data from WCF service to client without request ? For example in WCF I have function which in loop send data. How can I make that functionality ?
This can be achieved with a Full Duplex contract. Where you will hold reference to the client in the service instance and then you can use the CallbackContract to send messages to the client who has registered to the service.
Answering this question with a clear code example would require more of a blog post than stackoverflow reply. So just linking a very simplified example which you can find from here.
You could solve this with "long-polling"
This could help you: How do I implement basic "Long Polling"?
But there is the problem, that the client has to send a request first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With