Переглянути джерело

* RemotingServices.cs: If the type for a proxy is not available in
the client site, use the MarshalByRefObject type.

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

Lluis Sanchez 22 роки тому
батько
коміт
cc7eb33850

+ 5 - 0
mcs/class/corlib/System.Runtime.Remoting/ChangeLog

@@ -1,3 +1,8 @@
+2003-07-25  Lluis Sanchez Gual <[email protected]>
+
+	* RemotingServices.cs: If the type for a proxy is not available in
+	  the client site, use the MarshalByRefObject type.
+
 2003-07-21  Lluis Sanchez Gual <[email protected]>
 
 	* ServerIdentity.cs: Fixed bug #46645

+ 3 - 2
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs

@@ -148,6 +148,7 @@ namespace System.Runtime.Remoting
 			// FIXME: use type name when fRefine==true
 
 			Type classToProxy = fRefine ? objref.ServerType : typeof (MarshalByRefObject);
+			if (classToProxy == null) classToProxy = typeof (MarshalByRefObject);
 
 			if (objref.IsReferenceToWellKnow)
 				return GetRemoteObject(objref, classToProxy);
@@ -409,12 +410,12 @@ namespace System.Runtime.Remoting
 			IMessageSink sink = ChannelServices.CreateClientChannelSinkChain (url, channelData, out objectUri);
 			if (sink == null) 
 			{
-				if (url != null) 
+				if (url != null) 
 				{
 					string msg = String.Format ("Cannot create channel sink to connect to URL {0}. An appropriate channel has probably not been registered.", url); 
 					throw new RemotingException (msg);
 				}
-				else 
+				else 
 				{
 					string msg = String.Format ("Cannot create channel sink to connect to the remote object. An appropriate channel has probably not been registered.", url); 
 					throw new RemotingException (msg);