Search code examples
.netwcf.net-2.0duplex

Is it possible to have duplex communication between a WCF service and a .net 2.0 windows application? If so, how?


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?


Solution

  • 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.