473,398 Members | 2,403 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 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 1183
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Ian Tompsett | last post by:
H I was wondering if it possible for an object to serialize/deserialize itself from XML. I'd be guessing that it would need to use the XmlSerializer class, but that seems to want to create a...
14
by: vince | last post by:
Can I add (append) to an xml file that already contains a serialized object, and be able to deserialize to either or both objects from the same file...??? How is this done...?? thanks, vince
5
by: David Sworder | last post by:
Hi, I've created a UserControl-derived class called MyUserControl that is able to persist and subsequently reload its state. It exposes two methods as follows: public void Serialize(Stream...
0
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
1
by: Mike Pollett | last post by:
Hi, I have used the ISerializable interface before and the code below worked fine. Until I derived it from CollectionBase. The code will still serialize and deserialize the properties in this class...
2
by: alexandre martins | last post by:
Every time i try to make Deserialize the computer gives me the folowing error: "End of Stream encountered before parsing was complete" the code that i'm running is simple and is based on an...
2
by: Joe | last post by:
Hi I have a Generics List in a PropertyGrid I am able to Serialize it to XML but when I try to deserialize back to the class of the PropertyGrid The Constructor doesn't seem to fire to reload...
4
by: Hone | last post by:
I'm trying to serialize/deserialize the XML for an RSS 1.0 Feed (i.e. RDF) and the root element, as required by the standard, looks like this: <rdf:RDF ...> </rdf:RDF> However, I've tried...
4
by: =?Utf-8?B?Qnlyb24=?= | last post by:
When I try to serialize an instance of the LocationCell below (note Building field) I get an error in the reflection attempt. If I remove the _Building field it serializes fine. I tried renaming...
4
by: djidan | last post by:
hi, i am a newbe to c#, i'm trying to send en custom object from a client to a server, after reading a lot on the web ifound that i need to use: BinaryFormatter, MemoryStream, and Serialize...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.