471,317 Members | 1,869 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,317 software developers and data experts.

what is the meaning of "PublicKeyToken=null is not marked as serializable." ?

Hi Friends,

In my C# application, i have tried to serialize some structured data
using Soapformatter. While calling the serialize funciton i got the
exception message like

"mscorlib....The type <Appname>.<structurename> in Assembly <Appname>,
Version=1.0.2162.36249, Culture=neutral, PublicKeyToken=null is not
marked as serializable."

What is the meaning of the message and how can i solve this issue ?

Regards,
Prakash.

Dec 2 '05 #1
2 35463
Prakash,

Basically, it means that the type you are trying to serialize does not
have the Serializable attribute attached to it.

Make sure all the fields are serializable types, and then attach the
Serializable attribute to your type, and you should be good to go.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Prakash" <p.************@gmail.com> wrote in message
news:11*********************@g49g2000cwa.googlegro ups.com...
Hi Friends,

In my C# application, i have tried to serialize some structured data
using Soapformatter. While calling the serialize funciton i got the
exception message like

"mscorlib....The type <Appname>.<structurename> in Assembly <Appname>,
Version=1.0.2162.36249, Culture=neutral, PublicKeyToken=null is not
marked as serializable."

What is the meaning of the message and how can i solve this issue ?

Regards,
Prakash.

Dec 2 '05 #2
Thanks Nicholas Paldino.. i solved my issue by putting the serializable
attribute in fornt of the class name.
Then in your signature you have put like [.net/c# MVP]... shall i know
how to get MVP ?

Regards,
Prakash.

Dec 3 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by james | last post: by
1 post views Thread by Curious | last post: by
reply views Thread by Richard Lewis Haggard | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.