dotnet remoting:
hello!
I have a server which has 2 buildin network cards. I must be able to access
a singleton service from both networks represented by the 2 networkcards.
the 2 networks should remain separated because of security reasons.( I know
that now my service is propably the security problem)
So I created 2 HttpChannels and bound them to each one to the corresponding
network adapter adresses.
//first channel
System.Collections.IDictionary props = new System.Collections.Hashtable();
props["port"] = "81";
props["name"] = "http81";
props["bindTo"] = 111.111.111.2;
HttpChannel clientHttpChannel1 = new HttpChannel(props, clientProvider,
serverProvider);
ChannelServices.RegisterChannel(clientHttpChannel1);
//second channel
System.Collections.IDictionary props = new System.Collections.Hashtable();
props["port"] = "82";
props["name"] = "http82";
props["bindTo"] = 168.164.1.2;
HttpChannel clientHttpChannel2 = new HttpChannel(props, clientProvider,
serverProvider);
ChannelServices.RegisterChannel(clientHttpChannel2);
then I have a object which provides the service I register like
//register Service
Type theType = typeof(PathologyDataServer);
RemotingConfiguration.RegisterWellKnownServiceType(theType,
"PathologyDataServer", WellKnownObjectMode.Singleton );
everything works fine whilst connecting the first time to one of the
channels, but as soon as I try to connect to the other channel from another
computer I got a exception :
System.Net.WebException
{"The underlying connection was closed: Unable to connect to the remote
server." }
but this Exception does not affect the other channel, I am then still able
to use my service on the first connected machine.
Problem:
My aim is to use a singleton object service with 2 channels.
but I now wonder, if that is just not possible.
Any ideas, experiences, hints?
I appreciate everything!!
Thanks in advance
David