tags:

views:

64

answers:

0

I have 2 applications A1 and A2 with HttpChannel between them. Also there are 2 classes inherited from MarshalByRefObject - CObj1 and CObj2.

A1:

Cobj1 obj1 = new CObj1();

RemotingConfiguration.RegisterWellKnownServiceType( typeof(CObj1), "CObj1", WellKnownObjectMode.Singleton);

A2:

Cobj2 obj2 = new CObj2();

string _url = string.Format("http://{0}:{1}/CObj1", host, port);

CObj1 remObj1 = ((CObj1)(Activator.GetObject(typeof(CObj1), _url)));

remObj1.Method1(obj2);

The questin is: can I use obj2 in A1 after that? Do i need any RegisterWellKnown... for CObj2 even i do not need to get it by Activator.GetObject? In that scenario where is obj2 activated?

I am sorry but i could not find an answer myself.