Protobuf strangeness

I’m just wondering what the difference is between using client.Put and client.Send when utilising Protobuf with the C# service client?

I have some code:

SettingResponse rtn = client.Put(new Setting
{
TenantId = tenantId,
Component = request.Id,
Value = request.Configuration,
Unlocked = true,
Visible = false
});

With this line, I get a WebServiceException:

Could not deserialize ‘application/x-protobuf’ request using [redacted]’
Error: ProtoBuf.ProtoException: Invalid wire-type; this usually means you have over-written a file without truncating or setting the length; see http://stackoverflow.com/q/2152978/23354
at ProtoBuf.ProtoReader.ReadString() in C:\code\protobuf-net\src\protobuf-net\ProtoReader.cs:line 542
at proto_14(Object , ProtoReader )
at ProtoBuf.Meta.TypeModel.DeserializeCore(ProtoReader reader, Type type, Object value, Boolean noAutoCreate)
at ProtoBuf.Meta.TypeModel.Deserialize(Stream source, Object value, Type type, SerializationContext context)
at ServiceStack.ProtoBuf.ProtoBufFormat.Deserialize(Type type, Stream fromStream)
at ServiceStack.Host.Handlers.ServiceStackHandlerBase.CreateContentTypeRequest(IRequest httpReq, Type requestType, String contentType)

If I change the method to ‘Send’ rather than ‘Put’, the request succeeds? Have I missed something?

Can you post the raw HTTP Headers for both requests.

Apologies, protobuf seems to complain when sending back a standard HttpResult response. This is where the deserialize is failing…

Very strange, it’s not even getting to the appropriate route to run any code. The Send request doesn’t actually achieve anything but runs without error. Attempting to get the headers for you now.