在企业场景中通过代理使用 TCP 隧道进行双工 WCF 连接
我们正在为尚未发布的企业级 LOB 应用程序中的一项功能使用双工合约,该应用程序利用使用 WPF 构建的胖客户端和使用 WCF 构建的服务器。
到目前为止,在开发过程中,我们一直在使用 net.tcp 绑定以获得最佳性能。现在部署即将到来,通过 Web 代理访问 Internet 等问题也已暴露出来,net.tcp 不再适用。
我已经开始使用 wsHttp 和 wsDualHttp,但同时意识到通过 Web 代理(以及 NAT 遍历)进行双工连接实际上是不可能的。
现在我在想:为什么我不能建立一个 tcp 隧道(使用支持 Web 代理的专有软件,使用 HTTP CONNECT)并获得两全其美:代理支持、速度和安全性?
We're using a duplex contract for one feature in our yet to be released enterprise level LOB application that utilizes a thick client built with WPF and a server built with WCF.
During development so far we've been using the net.tcp binding for best performance. Now that deployment is coming up and issues such as internet access through a web proxy come to light, net.tcp isn't suitable anymore.
I've started using wsHttp and wsDualHttp but have realised in the meantime that duplex connections through a web proxy (and with NAT traversal) isn't really possible.
Now I'm thinking: why can't I set up a tcp tunnel (using proprietry software that supports web proxies, using HTTP CONNECT) and get the best of both worlds, proxy support, speed and security?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来这是一个常见的要求。
你的选择并不广泛。如果 Microsoft 的服务总线能够满足您的需求,它可能是您的最佳选择。其他选项是:
至于通过隧道连接运行 WCF,如果您采用该路线,则不会遇到任何问题。所有绑定和功能都有效——回调、可靠性、消息安全、传输安全、事务,一切都工作得很好。
It would seem this is a common requirement.
Your options are not expansive. Microsoft's Service Bus is probably your best bet, if it works for your needs. The other options are:
As far as running WCF over a tunneled connection, if you go that route, you won't have any problems. All the bindings and features work-- callbacks, reliability, message security, transport security, transactions, all work just fine.