Jul 18, 2007

1 host, 2 services, 1 endpoint each, but only 1 port ?

The question came up, if it would be possible to host two or more WCF services (in the same executable to be precise) on the same port using the WSHttpBinding binding?

I wrote a little test and the question is: Yes. I'm guessing this is due to the fact that WCF only uses one listener here and there is no port conflict. Using WSDualHttpBinding would probably cause conflicts on the callback ports (if there is more than one client executable (WCF listener) implementing the callback service).

Port sharing also works for the TCP binding. However, throws an exception when bindings are mixed (one service to use HTTP and the other TCP)

No comments:

Post a Comment