[Mono-devel-list] Problem attaching to remoting server's method

John Bailo jabailo at texeme.com
Sat Jul 2 13:13:49 EDT 2005


I posted a problem last week about attaching to a remoting server that 
marshalls a remote object.  It's important that I understand why this code is 
not working -- I need to translate a remoting project to mono.   My own 
sample code is attached if you want to try it yourself.

 The error thrown is

	"Couldn't bind to method..."

Here is my original thread in the mono archives:

http://lists.ximian.com/pipermail/mono-devel-list/2005-June/012831.html

I do not see any responses but further Googling shows that others seem to have 
this problem since 2004:

http://article.gmane.org/gmane.comp.gnome.mono.general/19709

https://listas.hispalinux.es/pipermail/mono-hispano/2004-November/000929.html

http://www.mail-archive.com/mono-list%40lists.ximian.com/msg12073.html

The error might be bubbling up from this code of the mono core libraries, in 
the CreateDelegate method

http://galactus.ximian.com/pipermail/mono-patches/2004-March/032278.html
 
"if (!type.IsSubclassOf (typeof (MulticastDelegate)))
 throw new ArgumentException ("type is not subclass of MulticastDelegate");
throw new ArgumentException ("type is not subclass of MulticastDelegate.");
 
 ParameterInfo[] delargs = type.GetMethod ("Invoke").GetParameters ();
 Type[] delargtypes = new Type [delargs.Length];
@@ -139,21 +137,21 @@
 MethodInfo info = target.GetMethod (method, flags, null, delargtypes, new 
ParameterModifier [0]);
 
 if (info == null)
 throw new ArgumentException ("Couldn't bind to method");
 throw new ArgumentException ("Couldn't bind to method.");
 
return CreateDelegate_internal (type, null, info);"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChatCentral.cs
Type: text/x-c++src
Size: 384 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050702/ac20d77d/attachment.bin 
-------------- next part --------------
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
   <system.runtime.remoting>
      <application>
         <service>
            <wellknown
               mode="Singleton"
               type="ChatCoordinator, ChatCoordinator"
               objectUri="Chat"
            />
         </service>
         <channels>
            <channel
               ref="http"
               port="8080"
            />
         </channels>
      </application>
   </system.runtime.remoting>
</configuration>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChatCoordinator.cs
Type: text/x-c++src
Size: 3604 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050702/ac20d77d/attachment-0001.bin 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050702/ac20d77d/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChatClient.cs
Type: text/x-c++src
Size: 3852 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20050702/ac20d77d/attachment-0002.bin 


More information about the Mono-devel-list mailing list