2005-05-17 Lluis Sanchez Gual <lluis@novell.com>
authorLluis Sanchez <lluis@novell.com>
Tue, 17 May 2005 17:53:03 +0000 (17:53 -0000)
committerLluis Sanchez <lluis@novell.com>
Tue, 17 May 2005 17:53:03 +0000 (17:53 -0000)
* ObjRef.cs: Use IsInstanceOfType instead of IsAssignableFrom
since GetType() may not return the correct type if the object is
a remoting proxy.

svn path=/trunk/mcs/; revision=44637

mcs/class/corlib/System.Runtime.Remoting/ChangeLog
mcs/class/corlib/System.Runtime.Remoting/ObjRef.cs

index 5fb688df5a28376dbbaf2eb7bd4c3f2e752acd58..ea6470e673e20eaf25bd9956f3c79d13211c950c 100755 (executable)
@@ -1,3 +1,9 @@
+2005-05-17  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * ObjRef.cs: Use IsInstanceOfType instead of IsAssignableFrom
+       since GetType() may not return the correct type if the object is
+       a remoting proxy.
+
 2005-05-12  Atsushi Enomoto  <atsushi@ximian.com>
 
        * RemotingConfiguration.cs : MiniParser->SmallXmlParser changes.
index 30234367827314cbfaa1b837eebdc0ec1ef83232..0c665c848860273f5fe6bd6867156fd85d1d66f1 100644 (file)
@@ -92,7 +92,7 @@ namespace System.Runtime.Remoting {
                        uri = RemotingServices.GetObjectUri(mbr);
                        typeInfo = new TypeInfo(type);
 
-                       if (!type.IsAssignableFrom (mbr.GetType()))
+                       if (!type.IsInstanceOfType (mbr))
                                throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + ".");
 
                        UpdateChannelInfo();