|
|
@@ -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);
|