In our server, we configure the port in app.config as follows:
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="1234" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
We then proceed to configure the server with the following C# code:
RemotingConfiguration.Configure(string.Format("{0}{1}", appFolder, "app.exe.config"), false);
How do I reference the port number after it has been configured short of parsing the file by hand?
Looks like it is possible after all. After calling RemotingConfiguration.Configure(string, bool), I run the following method:
This gives me the TcpChannel info I need, which allows me to grab the ChannelUri and get the port.
GRAIT SUCCESS!