This is a multi-part message in MIME format.

------=_NextPart_000_0008_01C3C563.5176F310
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

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=3D1.0.3300.0, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089 is not marked as serializable.

Can anyone help ?

Many thanks (in advanced)

Alan Seunarayan
------=_NextPart_000_0008_01C3C563.5176F310
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1276" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hello all,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; I am trying to =
serialize a class=20
that I have created, it works fine until I instanciate the class via a =
new=20
Application Domain's CreateInstanceFrom method.&nbsp; When I attempt to=20
serialize I keep getting this exception....</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>An unhandled exception of type=20
'System.Runtime.Serialization.SerializationException' occurred in=20
mscorlib.dll</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>Additional information: The =
type=20
System.Runtime.Serialization.SerializationInfo in Assembly mscorlib,=20
Version=3D1.0.3300.0, Culture=3Dneutral, =
PublicKeyToken=3Db77a5c561934e089 is not=20
marked as serializable.</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anyone help ?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Many thanks (in advanced)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Alan =
Seunarayan</FONT></DIV></BODY></HTML>

------=_NextPart_000_0008_01C3C563.5176F310--

Re: Serialization w/ AppDomains problem by Dmitriy

Dmitriy
Sat Dec 20 04:04:26 CST 2003

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

"Alan Seunarayan" <w@xyz.com> wrote in message
news:OFb0MLWxDHA.3436@tk2msftngp13.phx.gbl...
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


Re: Serialization w/ AppDomains problem by Alan

Alan
Mon Dec 22 03:33:39 CST 2003

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

Alan


"Dmitriy Lapshin [C# / .NET MVP]" <x-code@no-spam-please.hotpop.com> wrote
in message news:u7plRCuxDHA.2508@TK2MSFTNGP12.phx.gbl...
> 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
>
> "Alan Seunarayan" <w@xyz.com> wrote in message
> news:OFb0MLWxDHA.3436@tk2msftngp13.phx.gbl...
> 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
>