I am writing a WCF RESTFUL service over a c++ console application. client uses a browser and connects to that c++ application via my restful wcf service,Whenever my wcf service gets an update from c++ application, I need to send that status update to a browser client without the browser refreshing the page. How can I do this? please help me out. Thanks a lot in advance.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Unfortunately you can't do this with WCF and the WebHttpBinding (REST) binding. Alternatively you can use a WCF binding that supports callbacks or take a look at running SignalR in an ASP.net WEB.API service.
Note the WCF bindings that support callbacks (duplex) are:
NetTcpBinding NetNamedPipeBinding WSDualHttpBinding