Does my proxy implements myinterface ?
Hi,
Well, well.. i'm getting the first post at this forum
Any help guys:
after doing
| | myobject = RemotingServices.Connect(typeof(MyClass), myUrl);
|
on a well known server activated, i want to test if
How can this be done, before calling anything on the object ?
Because even if it implements IMyInterface, i get a false value...
thanks!
HB
Dear Hugo,
I'm afraid this isn't possible. For well-known proxies, there is no class hierarchy information contained within the proxy itself, since the proxy is generated on the fly (i.e., there is no remote call involved in the construction, and the client doesn't have the class hierarchy info).
For well-known proxies, we allow casting the proxy to any interface, but the invocation will fail once it hits the server if the server does not implement the interface.
Alternatively, client-activated objects do have full type fidality. With CAOs, casting / testing via "is" should work.
Thanks,
-mike
Program Manager
Distributed Systems Group
Microsoft Corporation