XML serialization woes...

I spent quite some time debugging end of file was reached before parsing could be completed error when casting the body of an MSMQ message object to a byte array.

This is an object serialized to XML, and then compressed using .net framework classes. Thought it was a clash between .net 4.0 & 3.5.

Nope, turned out that to fix the issue did two things called flush on both serialization and de-serialization, then looked at the entity sent over the wire. The one which failed missed XML include attributes at the class level for some complex properties which were added later.

Now works fine. This never gave an error directly. Random errors while de-serialization, so difficult to debug.

And was not x64 os problem either

;-)

Comments

Popular posts from this blog

Tutorial: Using Google Cloud Storage from C# and .NET

Late 2008 Macbook only giving 1.5 gb/s speed with 6 gb/s Intel SSD?

Enable Visual Studio to use more than 2GB of memory