Problem using Remoting with 2 NICs



I have a remoting server (Class Factory) running on a PC with 2 NICs. NIC 1
is DHCP, NIC 2 is fixed IP Address.

I have clients connecting successfully on NIC 1, but clients connecting to
NIC 2 fail when accessing the methods of the inner classes of the Class
Factory.

For each NIC (IP Address), I create a Server Channel as follows, using a
different channel name for each NIC (IP Address), and binding the channel to
the IPAddress of the NIC:

private void RegisterServerChannel(string name, int port, IPAddress ipAddress)
{
IDictionary props = new Hashtable();
props["name"] = name;
props["port"] = port;
props["bindTo"] = ipAddress.ToString();
props["strictBinding"] = true;

BinaryServerFormatterSinkProvider serverProv =
new BinaryServerFormatterSinkProvider();
serverProv.TypeFilterLevel =
System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
BinaryClientFormatterSinkProvider clientProv =
new BinaryClientFormatterSinkProvider();

HttpChannel chnl = new HttpChannel(props, clientProv, serverProv);

ChannelServices.RegisterChannel(chnl);
}

After each Server Channel is registered, I call:
RemotingServices.Marshal(classFactory, objURI, typeof(IClassFactory));

I have a shared assembly that contains the interfaces for the classes
(simplified):

namespace SharedInterfaces
{
public interface IClassFactory
{
string SomeString{ get; set; }
IInnerClass InnerClass { get; }
}

public interface IInnerClass
{
bool SomeValue { get; }
}
}

When both NICs are enabled (clients connected to NIC 1 work perfectly).
Clients on NIC 2 can connect and successfully call IClassFactory.SomeString,
but when the Client on NIC 2 calls IClassFactory.InnerClass.SomeValue, I get
the following excetion:

System.Net.WebException: The underlying connection was closed: Unable to
connect to the remote server.

Server stack trace:
at System.Net.HttpWebRequest.CheckFinalStatus()
at System.Net.HttpWebRequest.EndGetRequestStream(IAsyncResult asyncResult)
at System.Net.HttpWebRequest.GetRequestStream()
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessAndSend(IMessage msg, ITransportHeaders headers, Stream inputStream)
at
System.Runtime.Remoting.Channels.Http.HttpClientTransportSink.ProcessMessage(IMessage
msg, ITransportHeaders requestHeaders, Stream requestStream,
ITransportHeaders& responseHeaders, Stream& responseStream)
at
System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type)
at SharedInterfaces.IInnerClass.get_SomeValue()

If I disable NIC1, the clients can access the inner classes of the class
factory on NIC 2. With both NIC 1 and NIC 2 enabled, the clients on NIC 2
can access "top level" mehtods of the class factory, but cannot access the
methods referencing the inner classes.

In short, the applicaiton works fine when there is only 1 NIC, but something
is going wrong when using 2 NICs. I suspect that I have something missing in
my configuration, but I am not able to find it.

Any input is greatly appreciated.

Thanks in advance.
--
- John
.



Relevant Pages

  • Re: SBS 2003 2NICs
    ... Some very good advice here on routing, IP's, disaster recovery etc. ... ISP in the UK in my opinion - I've got 3 clients using them and incompetent ... If your server ... the external and internal NICs need to be on ...
    (microsoft.public.windows.server.sbs)
  • Re: Help! Clients are off the network.
    ... Run the change server IP wizard to move it to 192.168.xx.2,. ... If none of this fixes it, give us a new config and look at the properties of the DHCP server and make sure your switch is working. ... You certainly need to get DHCP running properly on the SBS so that clients can receive a valid IP address. ... or fix the iphone with one or two nics your call. ...
    (microsoft.public.windows.server.sbs)
  • Re: Problem using Remoting with 2 NICs
    ... The server itself is currently running in a dual NIC configuration at ... I have clients connecting successfully on NIC 1, ... When both NICs are enabled. ...
    (microsoft.public.dotnet.framework.remoting)
  • RE: SBS2k3 VPN Issue
    ... Your SBS server has only one Nic. ... VPN clients to the same IP as the LAN, the clients can RDP either Server or ... When the server assigns the VPN clients the different IP ... <between the internal and external nics, hence routing the request, or have ...
    (microsoft.public.windows.server.sbs)
  • Re: Win2K RRAS/VPN Help
    ... > if you try to configure different gateway settings on the NICs). ... > on the server itself. ... *.201 thru *.225 IPs for VPN clients. ... RRAS using *.200 and clients getting *.200+ IPs. ...
    (microsoft.public.win2000.ras_routing)