.NET Remoting Client...
Hi,
I am trying a .NET Remoting server & client using config file.
The server uses,
<system.runtime.remoting>
<application>
<service>
<wellknown mode="Singleton" type="Temp.Temperature, Temp" objectUri="Temp"/>
<wellknown mode="Singleton" type="ServerClass.ServerEmul, ServerClass" objectUri="Temp2"/>
</service>
<channels>
<channel port="8000" ref="http">
<serverProviders>
<formatter ref="soap" typeFilterLevel="Full" />
</serverProviders>
<clientProviders>
<formatter ref="soap" />
</clientProviders>
</channel>
</channels>
</application>
</system.runtime.remoting>
</configuration>
The client uses...
<configuration>
<system.runtime.remoting>
<application name="ClientTest">
<client>
<wellknown type="Temp.Temperature, Temperature" url="http://localhost:8000/Temp"/>
<wellknown type="ServerClass.ServerEmul, ServerClass" url="http://localhost:8000/Temp2"/>
</client>
<channels>
<channel ref="http" port="0"/>
</channels>
</application>
</system.runtime.remoting>
</configuration>
The above config is registered using RemotingConfiguration.Configure(); Seems working fine for 1 Client instance. When I start using 2nd client instance, I am getting an error that the HTTP port is already in use. I tried 2nd client from another computer, it seems working fine. So I figured out that for client, <channel ref="http" port="0"/> needs to have an name attribute to refer to every client instance. How do I do this?
Is there a better way?
Please Advice,
Babloo
|