Answer the question
In order to leave comments, you need to log in
How to set up a client on the fly?
Good afternoon!
Given:
The Updater program connects to WCF and checks for the current version of the program.
The Monitor program works the same way with WCF.
2 WCF servers on Windows Server 2008 R2
It is necessary to:
Configure the configs (*.exe.config) of client programs on the fly so that WCF is connected to internal addresses (if the PC is located in the enterprise network) or external addresses (if the PC is located outside outside the enterprise)
Example:
A piece of code for connecting to an internal address:
<endpoint address="http://192.168.2.8:10202/Monitoring" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IMonitoring" contract="svc.IMonitoring"
name="BasicHttpBinding_IMonitoring" />
<endpoint address="net.tcp://192.168.2.8:10203/Monitoring" binding="netTcpBinding"
bindingConfiguration="MetadataExchangeTcpBinding_IMonitoring"
contract="svc.IMonitoring" name="MetadataExchangeTcpBinding_IMonitoring" />
<endpoint address="http://231.18.50.8:10202/Monitoring" binding="basicHttpBinding"
bindingConfiguration="BasicHttpBinding_IMonitoring" contract="svc.IMonitoring"
name="BasicHttpBinding_IMonitoring" />
<endpoint address="net.tcp://231.18.50.8:10203/Monitoring" binding="netTcpBinding"
bindingConfiguration="MetadataExchangeTcpBinding_IMonitoring"
contract="svc.IMonitoring" name="MetadataExchangeTcpBinding_IMonitoring" />
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question