tags:

views:

92

answers:

2

I get this exception when my client application is trying to deserialize a message comming from WCF service ("Incorrect wire-type deserializing TimeSpan").

I'm using .NET 3.5 SP1 and latest version of protobuf-net (1.0.0.275). I have no idea what could be the issue comming from. I don't undersand the reason of this error message. Anyone?

A: 

I would love to help (I'm the author of protobuf-net), but that isn't a huge amount to go on. Can you provide any kind of example for this? At the simplest level, I'm wondering if the service is fully configured - in particular if you are using "mex" or add-service-reference.

Marc Gravell
A: 

Had somewhat the same issue with missing wire-type for byte[] data types. I've fixed the issue by adding BlobSerializer to ValueMember.cs, GetCoreSerializer function. Can always check that function to see if the serializer is hooked up correctly.

        if (type == typeof(byte[]))
        {
            defaultWireType = WireType.String;
            return new BlobSerializer();
        }

Btw, love the efficiency of the serializer, what was 16GB with BinaryFormatter now only takes 400 mb.