[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Client activated remote objects within the same binaries, but in other instances

Brian Ray

10/24/2004 12:45:00 PM

I woul like to create an application which connects to other instances of
itself on different computers. There is only one application with one binary
..exe file, and the connection is made by a client activated remote object.

The problem is that I cannot register the client activated remote object
("Session" in this case) as ServiceType and ClientType with the following
functions:

RemotingConfiguration.RegisterActivatedServiceType(typeof(Session));
RemotingConfiguration.RegisterActivatedClientType(typeof(Session),
"tcp://ipaddress:3838");

The second call refuses the registration. (The ipaddress is discovered
dynamically.)

Is there any possibility to solve the problem?

Thanks any kind of help in advance:
Kazi


1 Answer

Robert Jordan

10/24/2004 1:10:00 PM

0

Hi Kazi,

> I woul like to create an application which connects to other instances of
> itself on different computers. There is only one application with one binary
> .exe file, and the connection is made by a client activated remote object.
>
> The problem is that I cannot register the client activated remote object
> ("Session" in this case) as ServiceType and ClientType with the following
> functions:
>
> RemotingConfiguration.RegisterActivatedServiceType(typeof(Session));
> RemotingConfiguration.RegisterActivatedClientType(typeof(Session),
> "tcp://ipaddress:3838");
>
> The second call refuses the registration. (The ipaddress is discovered
> dynamically.)

I don't think you can register the same type within the same
AppDomain as both service and client.

Just omit the RegisterActivatedClientType call, and, whenever
you need a remote Session instance, call this:

Session remoteSession = (Session)
RemotingServices.Connect(typeof(Session), "tcp://ipaddress:3838");

bye
Rob