U
Ulrich Proeller
Hi all,
I'm trying to call methods of a remote server using
reflection but
always get a MissingMethodException, saying that the
requested method
cannot be found.
In detail:
I have a server Svr which extends the interface ISvr. Svr
and ISvr are
implemented in different assemblies "Interface.dll"
and "Svr.dll".
I have a client which uses methods of Svr in two different
ways:
a) Directly:
Svr.Foo();
b) Via Reflection:
Svr.GetType().InvokeMember("Foo",
BindingFlags.Public |
BindingFlags.Instance |
BindingFlags.InvokeMethod,
null, Svr, null);
There are 2 scenarios:
1. Directly, NON-Remoting:
The client has a direct reference to "Svr.dll". Both calls
work
perfectly.
2. Remoting, local machine, TCP channel:
The client creates a transparent proxy of ISvr using the
RemotingHelper class of Ingo Rammer:
ISvr svr = (ISvr)RemotingHelper.GetObject(typeof(ISvr));
In this case, direct calls to the server work fine, but
the calls
using InvokeMember throw a MissingMethodException.
After two days of research, I'm at a loss. Has anyone out
there an
idea?
Thanks in advance
Uli Proeller
prosa GmbH, Germany
I'm trying to call methods of a remote server using
reflection but
always get a MissingMethodException, saying that the
requested method
cannot be found.
In detail:
I have a server Svr which extends the interface ISvr. Svr
and ISvr are
implemented in different assemblies "Interface.dll"
and "Svr.dll".
I have a client which uses methods of Svr in two different
ways:
a) Directly:
Svr.Foo();
b) Via Reflection:
Svr.GetType().InvokeMember("Foo",
BindingFlags.Public |
BindingFlags.Instance |
BindingFlags.InvokeMethod,
null, Svr, null);
There are 2 scenarios:
1. Directly, NON-Remoting:
The client has a direct reference to "Svr.dll". Both calls
work
perfectly.
2. Remoting, local machine, TCP channel:
The client creates a transparent proxy of ISvr using the
RemotingHelper class of Ingo Rammer:
ISvr svr = (ISvr)RemotingHelper.GetObject(typeof(ISvr));
In this case, direct calls to the server work fine, but
the calls
using InvokeMember throw a MissingMethodException.
After two days of research, I'm at a loss. Has anyone out
there an
idea?
Thanks in advance
Uli Proeller
prosa GmbH, Germany