dotnet remoting:
I have an assembly (iFormsServer) that exposes two objects descended
from MarshallByRefObject (iFormClient and iFormInstrument). The server
side configuration is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="5000"/>
</channels>
<service>
<wellknown type="iFormsServer.iFormClient,iFormsServer"
mode="SingleCall" objectUri="iServer"/>
<wellknown type="iFormsServer.iFormInstrument,iFormsServer"
mode="SingleCall" objectUri="iServer"/>
</service>
</application>
</system.runtime.remoting>
</configuration>
The client using these objects is configured thus:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="0"/>
</channels>
<client>
<wellknown type="iFormsServer.iFormClient,iFormsServer"
url="tcp://localhost:5000/iServer"/>
</client>
<client>
<wellknown type="iFormsServer.iFormInstrument,iFormsServer"
url="tcp://localhost:5000/iServer"/>
</client>
</application>
</system.runtime.remoting>
</configuration>
iFormClient implements interface IClientControl. iFormInstrument
implements interface IInstrumentControl.
On one Vista Ultimate machine, everything works as expected. On another,
presumably identical machine, the following client side code fails:
Public Function CreateClient() As Integer
Dim IClient As IClientControl
IClient = New iFormClient
CreateClient = IClient.Create()
End Function
The error states that the object I'm remoting to implements
IInstrumentControl (NOT IClientControl) as if the second wellknown type
registration has overridden the first. If I change the URI in the
registration for iFormsServer.iFormInstrument (on both client and
server) the problem goes away.
So, long winded way of asking, can server activated components share a
common URI or not? When/Why/etc.