properties of providers. This fixes bug #60934.
* ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach
the identity from the object, so it can be safely marshalled again.
svn path=/branches/mono-1-0/mcs/; revision=30685
+2004-07-02 Lluis Sanchez Gual <lluis@ximian.com>
+
+ * RemotingConfiguration.cs: Avoid adding "id" and "type" as custom
+ properties of providers. This fixes bug #60934.
+ * ServerIdentity.cs, RemotingServices.cs: When disposing an identity, detach
+ the identity from the object, so it can be safely marshalled again.
+
2004-06-15 Gert Driesen <drieseng@users.sourceforge.net>
* RemotingTimeoutException.cs: added missing serialization ctor
if (at == "id" && isTemplate)
prov.Id = val;
- if (at == "type")
+ else if (at == "type")
prov.Type = val;
- if (at == "ref" && !isTemplate)
+ else if (at == "ref" && !isTemplate)
prov.Ref = val;
else
prov.CustomProperties.Add (at, val);
else
throw new ArgumentException ("The obj parameter is a proxy.");
}
- else
+ else {
identity = obj.ObjectIdentity;
+ obj.ObjectIdentity = null;
+ }
if (identity == null || !identity.IsConnected)
return false;
protected void DisposeServerObject()
{
- _serverObject = null;
+ // Detach identity from server object to avoid problems if the
+ // object is marshalled again.
+
+ if (_serverObject != null) {
+ _serverObject.ObjectIdentity = null;
+ _serverObject = null;
+ }
}
}