相当不言自明。 我需要一个服务来通知我的客户端应用程序,如果发生了什么,但该应用程序是在.net 2.0中,我不愿升级这个功能。
是否有可能在WCF服务和.net 2.0应用程序之间进行双工通信?
Pretty self-explanatory. I have a need for a service to notify my client app if something happens, but the app is in .net 2.0 and I am loath to upgrade just for this functionality.
Is it possible to have duplex communication between a WCF service and a .net 2.0 app?
最满意答案
最终,是的...因为在最坏的情况下,WCF可以让你编写自己的自定义频道,这样你几乎可以做任何事情。 但...
我假设你问是否有简单/便宜的方法? 这一切都取决于您需要支持的“WCF”的功能,例如SOAP,元数据等 也许你甚至不需要WCF?“最简单的”方法之一可能是使用像HTTP这样的自定义双工通道 。 很明显,.NET 2.0支持HTTP,所以这是一个通用协议。
WCF确实有一个名为basicHttpBinding的旧式绑定,它支持.NET 2.0时代的旧式(WS 1.1)SOAP Web服务。 这只是一个请求 - 响应,所以为了建立一个双工通道,你需要建立一个建立在两个单工端点上的自定义绑定。
Ultimate, yes... because in the worst case WCF lets you write your own custom channels so you can pretty much do anything. But...
I am assuming you are asking if there is an easy/cheap way? This all depends on what features of "WCF" you need to support e.g. SOAP, Metadata etc Maybe you dont even need WCF?One of the 'simplest' ways might be to use something like this custom duplex channel built on top of HTTP. Obviously .NET 2.0 supports HTTP so thats a common protocol.
WCF does have a legacy binding called basicHttpBinding which supports the old-style (WS 1.1) SOAP webservices from .NET 2.0 era. This is only a request-response so to make a duplex channel you would need to build a custom binding which builds on top of two simplex endpoints.
更多推荐
发布评论