Serialization w/ AppDomains problem

  • Thread starter Thread starter Alan Seunarayan
  • Start date Start date
A

Alan Seunarayan

Hello all,
I am trying to serialize a class that I have created, it works fine until I instanciate the class via a new Application Domain's CreateInstanceFrom method. When I attempt to serialize I keep getting this exception....


An unhandled exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll

Additional information: The type System.Runtime.Serialization.SerializationInfo in Assembly mscorlib, Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is not marked as serializable.

Can anyone help ?

Many thanks (in advanced)

Alan Seunarayan
 
Hello Alan,

For a class to be serializable, all its public members and properties should
be of serializable types.
Your class probably violates this restriction by exposing a property or a
member of type SerializationInfo (hmm, what for?).

Anyway, if you could post some code snippet, you would really facilitate
tracking down the root of the problem.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

Hello all,
I am trying to serialize a class that I have created, it works fine
until I instanciate the class via a new Application Domain's
CreateInstanceFrom method. When I attempt to serialize I keep getting this
exception....


An unhandled exception of type
'System.Runtime.Serialization.SerializationException' occurred in
mscorlib.dll

Additional information: The type
System.Runtime.Serialization.SerializationInfo in Assembly mscorlib,
Version=1.0.3300.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 is not
marked as serializable.

Can anyone help ?

Many thanks (in advanced)

Alan Seunarayan
 
Thanks Dmitry,
Please see on of my previous relpies with the attached code.

Alan
 
Back
Top