Creating a CAO with Multiple Network Interfaces / Subnets

dotnet framework

    Sponsored Links

    Next

  • 1. Kill/Remove Context Proxy in Remoting on Client Side?
    Hi all, I'm making remoting calls in a web service. What is the best way to remove a context proxy after I am done with a call? On the client side ... should I be calling RemotingService.Disconnect or RemotingService.Unmarshal(MyRemoteObject) or some other method? Thanks!
  • 2. Remoting Heavy Load Hangs
    I have a client that has a [ very nicely done all in all ] test / data acquisition application. Under heavy data acquisition load the server 'appears' to hang. I've searched, and this does not seem to be a new problem, and there are too many web search hits to be practical. I'm hoping someone has solved this and can point me to the 2 or three that will help me fix my clients problem. Thanks in advance.
  • 3. Response time for method call on server
    Hi, I have remoting singleton server and a client. When a client makes a call to server sometimes it is taking more than 20 seconds to complete and then error message comes stating remote computer did not responded...etc. I think this is due to response time for temote call so can anyone know hot to increase this time limit Thank You -- Mahesh A Deo, MCP
  • 4. have duplicate wellknown types with different url?
    On Mon, 11 Jun 2007 20:42:10 -0500, Les Caudle < XXXX@XXXXX.COM > wrote: >I'd like to have this in my app.config > ><client> > <wellknown type="MyApp.Remoting.IRemoteServer, Interface" >url="tcp://172.16.0.4:8096/Rmt" /> > > <wellknown type="MyApp.Remoting.IRemoteServer, Interface" >url="tcp://172.16.0.101:8096/Rmt" /> > ></client> > >But, the duplicate wellknown type causes an exception at: > >RemotingConfiguration.Configure("MyApp.exe.config",false); > >---- >My goal is to access the same interface of an object located in two different >locations. > >I've tried having just the single entry in the config file, and changing the >ObjectUrl value, but it is read-only: > >foreach (WellKnownClientTypeEntry entr in > RemotingConfiguration.GetRegisteredWellKnownClientTypes()) { > entr.ObjectUrl = "tcp://172.16.0.101:8096/Rmt" > } > >Is there some way I can get around this? A way to use the exact same interface >at two different url's? solved by using GetObject(type, string) where the url is specified in the string

Creating a CAO with Multiple Network Interfaces / Subnets

Postby Andy » Sat, 28 Feb 2009 01:06:57 GMT

I have an application (C#, but I don't think that matters) using the
in which I'm using Activator.CreateInstance (Type, Object[], Object[])
to create a Client Activated Object. It works perfectly when the
client and server are both on machines with only one network interface
enabled and on the same subnet, but I'm working on an upgrade which
will require the client to have two active NICs, and be able to fetch
the remote object from a server on either NIC (or both).  I thought
since the third argument to CreateInstance is the URL of the remote
object server, it would be able to determine the appropriate network
interface to use, but the method call throws a
TargetInvocationException after a significant delay (a network error
timeout).  I'm running a packet sniffer called EtherPeek, and I can
see that no network traffic is going out on either NIC when the remote
object request is made, so it looks like the framework is just plain
confused, and can't determine which NIC on which to send the request.
(I would expect to at least see the request go out over the network,
and then have a timeout occur when no response was fired back.)

The server publishes the object using SOAP on an HttpChannel,
"useIpAddress" is set to false, and the "machineName" is set to the
Server's IP address.  (I had found many suggestions about doing this
to create a CAO through a router to a different subnet - a slightly
different situation than what's going on here.)  I can connect to both
networks with no problems, so networking is properly configured. I can
even use my web browser to see the URI, so it is properly published on
the Server.

The opposite setup (one server publishing a remote object on multiple
NICs) is easy and works fine, but I can't get this setup to work at
all. Has anyone ever seen a situation like this before, and if so,
figured out how to convince .NET to send the request out the right
interface?

Thanks much,
Andy

Re: Creating a CAO with Multiple Network Interfaces / Subnets

Postby Jono » Sun, 08 Mar 2009 09:25:03 GMT



Hi Andy,
I think I may have just solved a similar problem. From what I've seen,
getting a Socket to connect via a specific ethernet adapter is pretty
much beyond the scope of the classes in the .NET framework. It's down
to the operating system and the routing table to resolve which segment
of the network the server resides on, and hence which adapter to use.
It's easy to add new routes in both Windows and Linux, although I'm
not sure of how easy it is to do this across a large number of
clients. Hope this helps,
Jonathan

 http://www.**--****.com/ 

Similar Threads:

1.What is the differnce for SAO CAO Factory - Interfaces vs Abstact

2.CAO and Interfaces

My remoting created server objects need to maintain client state.  I also
want to use a shared interface dll between the client and server.  My
understanding is that CAO does not support shared interfaces.

Why does this limitation exist?

What is a recommended work around that will yield stateful objects and
shared interfaces?

Steve Binney


3.CAO and interfaces with Factory - what is the client setup

4.CAO - Interfaces - IIS

5.Can I CAO interfaces?

Hi,

I have defined an interface that is implemented by my server object, my
server object is hosted in IIS. Now I want to client activate the server
object, but the client only that the interface definition. When I do
something like:

IClass1 remoteClass1 = Activator.CreateInstance( typeof( IClass1 ) ) as
IClass1;

I received the following exception: Cannot create an instance of an
interface. Which is understandable.

Is it possible to this?

Thanks in advance.
JF


6. CAO and Shared Assembly Interfaces

7. How to access a CAO serverside, or - how to achieve CAO functionalities with a Singleton

8. Networking program to send multiple files for multiple clients



Return to dotnet framework

 

Who is online

Users browsing this forum: No registered users and 52 guest