WCF service is hosted in IIS and uses netTCPRelayBinding
.
At some locations the TCP ports are blocked and HTTP must be used. Other times TCP ports are open and this mode is preferred.
Thus, I'd like to be able to set the ConnectivityMode
to AutoDetect
(or to just HTTP) declaratively in the web.config
file.
For self hosted WCF, this is easily done:
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.AutoDetect;
How is this done declaratively in web.config
?