Search code examples
htmlwcfc#-4.0server-sent-events

can we use Server Sent Event (HTML5) with WCF


How can i use server sent events with WCF?

To be specific:

  1. how to make wcf broadcast and send data continuously to client.
  2. How to consume those information in HTML5 page.

Solution

  • No you cannot.

    What you are asking for is not possible.

    You can send data to WCF clients via callbacks over duplex bindings, but this is not receivable from javascript, only WCF clients.

    Or you can send data to client side javascript code using SignalR, which is an implementation of server sent events.