How to configure WCF to push real-time data to the client?

左心房为你撑大大i 提交于 2019-12-09 06:40:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!