Re: Problem using Remoting with 2 NICs



Chaz,

Thanks for the reply.

Yes, the 2 NIC's do share the same subnet. My first attempt at correcting
the problem was to change the subnet of one of the NICs. One side (static IP
- is a small workgroup LAN) Unfortunately, this did not correct the problem.

I have found that adding the property

props["useIpAddress"] = false;

to the channel configuration (see RegisterServerChannel method from my
original post) when creating the Http Channel(s) allows me to succesfully
connect to the server from either NIC.

The server itself is currently running in a dual NIC configuration at
another installation with no problems. This installation was performed about
10 months ago. I know that no OS level changes have been made on that server
since the software was installed. The PC in which the server is installed
now is a fully up to date WinXP Pro_SP2 box. I am suspecting that something
has changed at the OS (API) level between then and now. I currently have a
case open with MS suuport in hopes to get to the bottom of the problem.

Thanks,
--
- John


"Chaz" wrote:

Do the 2 NIC's ever share the same IP Subnet ?

e.g. NIC#1 DHCP Assigned 192.168.10.20
NIC#2 Static 192.168.10.1

Chaz

"KidO" <KidO@xxxxxxxxxxxxxxxx> wrote in message
news:CBF9BB69-D939-406B-928A-0038A5A382D1@xxxxxxxxxxxxxxxx
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: 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)
  • Re: Urgent! New router and big disaster
    ... NIC, you need to specify an external DNS server for DNS, instead of the ... Both NICs should point to his internal IP for DNS. ... forward ports to it reliably in the router. ...
    (microsoft.public.windows.server.sbs)
  • 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)