[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.remoting

Odd serialization exception with ServerIdentity

Steve Kropla

6/27/2004 12:04:00 PM

Hi, I would like to serialize a class derived from ContextBoundObject and
marked with the ProxyAttribute. Here, is what I do:

MyCBO obj = new MyCBO(); // get a transparent proxy
MyCBO realObj = ... ; // some code used to retrieve the 'real' CBO
(new BinaryFormatter()).Serialize(new MemoryStream(), realObj);

When run, this code throws the following exception:

An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in
mscorlib.dll
Additional information: The type System.Runtime.Remoting.ServerIdentity in
Assembly mscorlib, Version=1.0.5000.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089 is not marked as serializable.

This exception is odd because in rotor (see
http://www.123aspx.com/rotor/RotorSrc.aspx...) ServerIdentity is
marked as Serializable. Does anyone has an idea on how to fix this issue ?

Joannes

Ps: In case you are wondering why I am trying to serialize a
ContextBoundObject, you could have a look at http://ngrid.source....


1 Answer

Steve Kropla

7/19/2004 9:31:00 AM

0

The file NGridBugDemo.cs is also available from
http://www.vermorel.com/opensource/NGrid...

Joannes