Is it possible to determine the interfaces that can be used to cast a MarshalByRefObject object?
How does the cast operator work with MarshalByRefObject objects? Does it call the CreateObjRef method?
Thanks,
Massimo
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Here’s a workaround that can be used to retrieve the list of interfaces.
Define a public interface
IDescriptorDefine a base class that implements the interface:
Than use the BaseMasrhalByRefObject instead of MasrhalByRefObject to define a service object:
In AppDomain A create the reference object of MyServiceObject.
In AppDomain B get the proxy of the remote object. The proxy can be cast to IDescriptor: