WCF服务如何在不使用双HTTP的情况下调用客户端 [英] How can WCF Service call client without using dual HTTP

查看:116
本文介绍了WCF服务如何在不使用双HTTP的情况下调用客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我有问题,我希望我的wcf服务在执行某些操作或标准匹配时调用客户端,我也不想使用双HTTP,因为根据知识在服务器的连接模式下双HTTP工作,如果不需要,我不希望我的服务器处理不必要的连接,

所以我请求所有人请告诉我我该怎么办。 />


提前谢谢。

Hi,
I have problem that, I want my wcf service make call to client when some action performed or criteria matched, Also I don't want to use dual HTTP, Because as per knowledge Dual HTTP work on connected mode with server and I don't want that my server handle unnecessary connection if its not required,
So I request to all of you please suggest me what can I do.

Thanks in advance.

推荐答案

如果客户端未连接到服务器,则表示客户端是服务器未知,实际上不存在。在这种情况下,要求HTTP服务器呼叫客户端(顺便说一句是什么?:-))意味着与自己相矛盾。



HTTP本身是一种非对称(客户端 - 服务器)无状态协议。它基于纯粹的拉技术。客户端连接到HTTP服务器(反之亦然),因为他们知道要连接的IP地址和端口。没有类似的东西允许HTTP服务器连接到客户端(即使服务器设计为这样做)。你需要的东西看起来像服务器推送。请参阅:

http://en.wikipedia.org/wiki/Pull_technology [< a href =http://en.wikipedia.org/wiki/Pull_technologytarget =_ blanktitle =New Window> ^ ],

http://en.wikipedia.org/wiki/Server_push [ ^ ],

http://msdn.microsoft.com/en-us/library/ms751522.aspx [ ^ ]。







注意SignalR技术: http:// www .asp.net / signalr / overview / getting-started / introduction-to-signalr [ ^ ]。
If client is not connected to the server, it means that the client is unknown to the server, virtually does not exist. In this case, requiring HTTP server to "call" the client (what is that, by the way? :-)) would mean to contradict yourself.

HTTP itself is one the asymmetric (client-server) stateless protocol. It's based on pure pull technology. The clients connect to the HTTP server (not visa versa), because they "know" the IP address and port to connect to. There is nothing like that to allow the HTTP server to connect to client (even if the server was designed to do so). And what you need looks like server push. Please see:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Server_push[^],
http://msdn.microsoft.com/en-us/library/ms751522.aspx[^].



Pay attention for the SignalR technology: http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr[^].
http:/ASP.NET 告诉我们:

实时Web功能是指服务器代码在连接的客户端可用时立即将内容推送到连接的客户端,而不是让服务器等待客户请求新数据。

Real-time web functionality is the ability to have server code push content to connected clients instantly as it becomes available, rather than having the server wait for a client to request new data.

特别注意:连接客户



-SA


我将解决我在WCF服务中使用MSMQ绑定的问题,B'cos我认为这对我的问题是好的,可靠的和安全的选择
I am going to solve my issue with MSMQ binding in WCf services, B'cos i think it is good, reliable and secure option for my problem


这篇关于WCF服务如何在不使用双HTTP的情况下调用客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆