* ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
authorLluis Sanchez <lluis@novell.com>
Thu, 22 Jul 2004 09:25:59 +0000 (09:25 -0000)
committerLluis Sanchez <lluis@novell.com>
Thu, 22 Jul 2004 09:25:59 +0000 (09:25 -0000)
  must be the object class or a base class. This fixes bug #61249.

svn path=/branches/mono-1-0/mcs/; revision=31369

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

index f1c1e51db57518cc1bae4ca02082af477a592edc..14aa52173f9b5d4b630a7264e7ee2ce4152da583 100755 (executable)
@@ -1,3 +1,8 @@
+2004-07-22  Lluis Sanchez Gual  <lluis@novell.com>
+
+       * ObjRef.cs: Fixed type check in in ObjRef constructor. The requested class
+         must be the object class or a base class. This fixes bug #61249.
+
 2004-07-22  Lluis Sanchez Gual  <lluis@novell.com>
 
        * RemotingServices.cs: Changed GetMethodBaseFromMethodMessage so its code
index 90db146c2670c2b221d60797082f363b10b3d711..30234367827314cbfaa1b837eebdc0ec1ef83232 100644 (file)
@@ -92,7 +92,7 @@ namespace System.Runtime.Remoting {
                        uri = RemotingServices.GetObjectUri(mbr);
                        typeInfo = new TypeInfo(type);
 
-                       if (!typeInfo.CanCastTo(mbr.GetType(), mbr))
+                       if (!type.IsAssignableFrom (mbr.GetType()))
                                throw new RemotingException ("The server object type cannot be cast to the requested type " + type.FullName + ".");
 
                        UpdateChannelInfo();