反射与remoting的问题,高手来
米的向日葵 2010-03-17 09:32:26 I'm trying to programm a little server to load at runtime
an assembly and Register a Class as WellKnownServiceType.
The architecture is this: (with other names)
CommonTypeLibrary
- with interface IComponent definition
ComponentTypeLibrary (Reference to CommonTypeLibrary)
- with class CComponent definition, inherits
MarshalByRefObject and implement IComponent
Server
- which load at runtime CommponentTypeLibrary and
register CComponent as WellKnow...
Client (Reference to CommonTypeLibrary)
- which try to access the serviced component by the
IComponent
I make several tests, first doing it like the HOW-TO way
and work. when I tried to make de Load at runtime I get
an error not while registerring the component, but yes
when the cliente try to access it (so, when the server
create the object)
I check and the assemblies of the ComponentTypeLibrary
(the two: one for IComponent and the one for CComponent)
are loaded.
Probably it's just a problem of loading or something with
Reflection. I'm still looking but if someone has an
idea... wellcome.