Hi,
I'm using Adapter 2.5 and have returned to doing some more testing based on LLBLGen's Remoting example. I've extracted the Server registration code into its app.config and that works ok. I could do with some advice on doing the equivalent for the Client and its own config file.
First, I can add keys to the client's app.config for url details and Servername then in Startup.cs, just get those values from its config and change the MarshalByRefObject line to:
MarshalByRefObject o = (MarshalByRefObject)RemotingServices.Connect(typeof(IService), string.Format(URLREMOTECONFIG, SERVERNAME));
This works fine, but I would like to extract channel details as well but I can't get it defined correctly. Here's what I have:
Client app.config:
<configuration>
<appSettings>
<add key="ServerName" value="localhost"/>
</appSettings>
<system.runtime.remoting>
<application name="Northwind.GUI">
<client>
<wellknown type="RemotingService.Service" url="tcp://localhost/theEndPoint" />
</client>
<channels>
<channel ref="tcp client" port="65100" />
</channels>
</application>
</system.runtime.remoting>
</configuration>
Startup.cs
RemotingConfiguration.Configure("Northwind.GUI.exe.config", true);
MarshalByRefObject o = (MarshalByRefObject)RemotingServices.Connect(typeof(IService), **what do I put here**);
How do I define the 2nd parameter of RemotingServices.Connect
ie. how do I get the url details from the config file without using config keys?
Thanks