In .Net Activator.GetObject(Type type, string url, object data) returns a proxy to the object. I guess that proxy inherits from MarshalByRefObject and can be sent across AppDomains. Am I right?
In my app, I am creating an object in appdomain A and using it appdomain B. The object's members are proxyobjects created using Activator.GetObject (). so, when I am in AppDomain B, I have a transparent proxy to the object created in appdomain A. When I try to execute a call the method on the proxy objects, I am running into errors.
For Example, I Create a Connection object in App Domain B. I have the transparent proxy for the Connection object in App Domain A. I run in to error when I try to make a call like this from AppDomain A. ConnectionObject.SecurityProxy.GetSecurityAccount( ). looks like the problem is When I try to make a call like the one above, it is trying to create the SecurityProxy again in AppDomain A instead of forwarding the call to AppDomain B. The security proxy has already been created in AppDomain B when the connection object was created.
Could you please help me figure out what I am doing wrong?
Regards, Anil.