471,627 Members | 1,152 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Serialize Obj from App A and Deserialize it from App B

Hi!

I have two applications A and B.

I used the BinaryFormatter object to serialize and deserialize object of
Structure "st" in my Applicaion "A".

Now I tried to Deserialize that Object from application "B". It gave me
following error message.

[An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
mscorlib.dll

Additional information: Cannot find the assembly A, Version=1.0.2240.32685,
Culture=neutral, PublicKeyToken=null.]

whereas I can easily read that Object in application "A".

when I opened the file that contain the serialized object I found that
application "A" placed its name as header while serializing object.

Any way to solve this problem.

Please note that I am serializing more than 1 objects in same file.

Regard,

Ahmad Jalil Qarshi
Feb 21 '06 #1
2 1114
I dont know if this is the correct answer, but perhaps try declaring
your structure in a 3rd project, class library.
Have application A and B both reference the project and thus the
struct. See if that helps.
I am thinking along the lines of the dll assembly now being the same in
both solutions. Also perhaps could be a namespacing issue?
Give app A and B same Namespace if the above point doesn't work

I'm interested to know the solution if I am way off course.

Feb 21 '06 #2
My guess is that you are using .NET 1.1.

I would recommend sharing exactly the same assembly version between the two
applications, or hardcode the assembly version and and use identical
signatures.

- Sahil Malik [MVP]
ADO.NET 2.0 book -
http://codebetter.com/blogs/sahil.ma.../13/63199.aspx
__________________________________________________ ________
"Ahmad Jalil Qarshi" <ah*********@SPAMhotmail.com> wrote in message
news:u0**************@TK2MSFTNGP14.phx.gbl...
Hi!

I have two applications A and B.

I used the BinaryFormatter object to serialize and deserialize object of
Structure "st" in my Applicaion "A".

Now I tried to Deserialize that Object from application "B". It gave me
following error message.

[An unhandled exception of type
'System.Runtime.Serialization.SerializationExcepti on' occurred in
mscorlib.dll

Additional information: Cannot find the assembly A,
Version=1.0.2240.32685, Culture=neutral, PublicKeyToken=null.]

whereas I can easily read that Object in application "A".

when I opened the file that contain the serialized object I found that
application "A" placed its name as header while serializing object.

Any way to solve this problem.

Please note that I am serializing more than 1 objects in same file.

Regard,

Ahmad Jalil Qarshi

Feb 21 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by vince | last post: by
5 posts views Thread by David Sworder | last post: by
2 posts views Thread by alexandre martins | last post: by
2 posts views Thread by Joe | last post: by
4 posts views Thread by =?Utf-8?B?Qnlyb24=?= | last post: by
4 posts views Thread by djidan | last post: by
reply views Thread by leo001 | 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.