问题
I need to send live updates from server to client. I know that WCF generally can do this. However silverlight is a picky client..
Does anyone know how to configure WCF to send the real-time updates to Silverlight client?
Snipets from configs and walkthrough will be greatly appreciated.
回答1:
Use WCF Callbacks. A good walkthrough that shows several configurations for this is available on the MSDN. We used the NetTCPBinding at my last job to great effect. It's very fast and efficient. The downside is that it doesn't support secure transport on Silverlight, so if that's a requirement you'll need to go with the PollingDuplexHttpBinding.
回答2:
http://weblogs.asp.net/dwahlin/archive/2008/06/16/pushing-data-to-a-silverlight-client-with-wcf-duplex-service-part-i.aspx
回答3:
Depending on the infrastructure (intranet?) you could use sockets.
回答4:
You can setup your WCF service to use PollingDuplexHttpBinding .
See this video tutorial from channel9.
来源:https://stackoverflow.com/questions/5649249/how-to-configure-wcf-to-push-real-time-data-to-the-client