Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7851307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T19:08:29+00:00 2026-06-02T19:08:29+00:00

I am using protobuf-net with WCF, and finding that data members with Order =

  • 0

I am using protobuf-net with WCF, and finding that data members with Order = 0 are not showing up on the client. Here is my data contract – ObjectId is always Guid.Empty on the client side.

<DataContract()> _
Public Class ProtocolBufferDataContract

    <DataMember(Order:=0)> _
    Public Property ObjectId() As Guid

    <DataMember(Order:=1)> _
    Public Property Title() As String

End Class

I am using the shared-assembly mechanism, so both the server and client are compiled against this class. If I change the orders to 1 and 2, everything works. Why doesn’t it work with 0?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T19:08:31+00:00Added an answer on June 2, 2026 at 7:08 pm

    Odd – I would have expected it to error with that. Protobuf key numbers are always positive, so 0 is indeed not valid for protobuf-net. Hence I would expect it to throw! For this reason, it. Is also possible to specify an offset to apply to WCF keys (intended primarily for use with proxy types). This can be done via ProtoContractAttribute (directly, or in a “partial class” if using proxy generation), or can probably (I haven’t checked) be applied at runtime via RuntimeTypeModel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Protobuf-Net, I see that it does not seem possible to deserialize a class
I'm using protobuf-net r278 in C#, and I just noticed that if I have
I'm having issues deserializing certain Guid properties of ORM-generated entities using protobuf-net. Here's a
Is it possible to use protobuf-net in RESTful webservices created using WCF RESTful starter
I have a WCF service hosted that is returning a byte[] of protobuf-net serialized
I am using protobuf-net for performance reasons in a scenario where the assemblies that
I'm using Protobuf-net. Suppose I have a list of Gizmo objects serialized and that
I'm trying to consume a WCF webservice using the RPC capabilities of the Protobuf-net.
I am using Protobuf-net (v1 r282) in a .NET CF 3.5 application(client) and a
I started using Protobuf-Net in C# and WPF projects. I have a class that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.