Search code examples
wcfsslstreamingduplex-channel

Https and streaming? IDuplexSessionChannel via http - client port open by default?


I have some small questions of which I think they're quite easy to answer for a WCF expert, but which I don't exactly know. I'm hoping they're not to obvious:

  1. Does transport security (http with ssl) work in conjunction with streaming? If no, how can I transfer large data in a secure way to the client?
  2. If I am not completely off the track an IDuplexSessionChannel requires the client to open a port too, so that the service can contact the client via a callback. Does this also affect an IDuplexSessionChannel which comunicates via http? Port 80 should be open by default, shouldn't it?

Solution

    1. Yes streaming works with HTTPS (basicHttpBinding).
    2. Yes duplex session channel requires port opened on the client because duplex communication over HTTP really means one connection from the client to the server and one reverse connection from the server to the client. Port 80 doesn't have to be opened by default on the client - if it is, it is most probably already associated with some web server so it cannot be used for the communication. Duplex communication is also WCF specific (it is not interoperable) and it leads to other consequences. For example in Windows Vista \ Windows 7 \ Windows 2008 Server with UAC you must run the client with elevated privileges or allow listening on the port by using netsh command line utility.

    I'm not sure how these two questions are related but wsDualHttpBinding (implementation of IDuplexSessionChannel) doesn't support streaming or transport security.