WCF推送到客户端通过防火墙? [英] WCF push to client through firewall?

查看:248
本文介绍了WCF推送到客户端通过防火墙?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

另请参见<一个href="http://stackoverflow.com/questions/1700917/how-does-a-wcf-server-inform-a-wcf-client-about-changes-better-solution-then-si">How没有一个WCF服务器通知   WCF客户端的变化? (更好   那么解决方案简单的投票,例如   COMENT或长轮询)

See also How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Coment or long polling)

我需要通过客户端的防火墙使用推技术与WCF。这必须是一个常见的​​问题,我知道它在理论工作(见下面的链接)的事实,但我没能得到它的工作,我一直没能找到一个code示例,演示它

I need to use push-technology with WCF through client firewalls. This must be a common problem, and I know for a fact it works in theory (see links below), but I have failed to get it working, and I haven't been able to find a code sample that demonstrates it.

要求:

  • WCF
  • 在客户端通过TCP端口80(NetTcpBinding的)连接到服务器。
  • 在服务器推回不定期的信息(1分钟到几个小时)。
  • 在用户不应该配置他们的防火墙,服务器推出必须通过具有所有入站端口关闭防火墙。在同一个连接的TCP双工是必要的,这有双重约束不起作用,因为端口必须打开客户端防火墙上。
  • 在客户端发送心跳服务器定期(或许每15分钟),使服务器知道客户端还活着。
  • 在服务器IIS7是用了。

将溶液似乎是双工NetTcpBinding的。基于这样的信息:

The solution seems to be duplex netTcpBinding. Based on this information:

<一个href="http://blogs.msdn.com/drnick/archive/2006/05/01/configuring-wcf-for-nats-and-firewalls.aspx">WCF通过防火墙和NAT

保持连接在IIS 开放

但我还没有找到一个code样品的作品。我已经试过从微软的WCF样片未经任何运气相结合的双面和TcpActivati​​on样本。请可有人点我的例子code这样的作品,或建立一个小的示例应用程序。非常感谢!

But I have yet to find a code sample that works.. I've tried combining the "Duplex" and "TcpActivation" samples from Microsoft's WCF Samples without any luck. Please can someone point me to example code that works, or build a small sample app. Thanks a lot!

推荐答案

我已经找到了几个解决方案:

I've found a couple of solutions:

ZeroC冰 GPL与商业选择。只有快速测试。看起来比.NET远程处理功能更强大,非常积极地开发。

ZeroC Ice GPL with a commercial option. Have only tested quickly. Looks more powerful than .NET Remoting and is very actively developed.

的RemObjects 商业,积极发展,支持一切,但似乎并没有让所有的更先进的功能,GenuineChannels使用。

RemObjects Commercial, active development, supports everything but does not seem to have all the more advanced features that GenuineChannels use.

GenuineChannels 的。它采用远程与很多不错的附加功能,最重要的是它通过的NAT,而无需打开客户端的防火墙。遗憾的是似乎很死。

GenuineChannels. It uses remoting with a lot of nice added features, the most important one being it works through NATs without the need to open the client firewall. Unfortunately seems to be very dead.

另一个解决方案是用IIS流,根据此文章:保持连接打开IIS中

Another solution is to use streaming with IIS, according to this article: Keeping connections open in IIS

客户端发出的80端口第一次连接(HTTP与IIS6,TCP与IIS7)到服务器,连接随后跟上流响应,永远不会结束营业。

The client makes the first connection (http with IIS6, tcp with IIS7) to the server at port 80, the connection is then kept open with a streaming response that never ends.

我还没有尝试这个的时候,我还没有找到一个样本表示,专门解决防火墙问题,但这里的大概工作一个很好的例子:流XML

I haven't had the time to experiment with this, and I haven't found a sample that says it specifically solves the firewall-problem, but here's an excellent sample that probably works: Streaming XML.

这篇关于WCF推送到客户端通过防火墙?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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