BinaryFormatter Version incompatibility. Expected Version 1.0. Received Version 1986938170.18863504

J

Joshua Moore

I have a webservice that serializes a ton of variables and other good stuff
to a txt file using SoapFormatter (IFormatter), and when I try to
deserialize it using the binary formatter, i get the following error:


BinaryFormatter Version incompatibility. Expected Version 1.0. Received
Version 1986938170.1886350437.


I've read a lot about this error from several sources on the net, but can't
get a good solution or walkthrough to find out how to fix it.

This is my call stack:

System.Runtime.Serialization.Formatters.Binary.SerializationHeaderRecord.Rea
d(__BinaryParser input)


System.Runtime.Serialization.Formatters.Binary.__BinaryParser.ReadSerializat
ionHeaderRecord()



System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run()



System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(Head
erHandler handler, __BinaryParser serParser, Boolean fCheck,
IMethodCallMessage methodCallMessage)



System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler, Boolean fCheck,
IMethodCallMessage methodCallMessage)



System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream, HeaderHandler handler)



System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(S
tream serializationStream)
 
A

Alexander Muylaert

I'm not 100% sure, but when you write with a SoapFormatter, you should read
with a soapformatter.
When you write with a Binary formatter, read with one to.

Kind regards

Alexander
 
J

Joshua Moore

It writes with a SoapFormatter on the web service, but I don't have access
to a SoapFormatter, only a BinaryFormatter when not using a web service.
The point of the code is demo accessability without accessing the web
service.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top