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 895099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:30:19+00:00 2026-05-15T14:30:19+00:00

I have a WCF service hosted that is returning a byte[] of protobuf-net serialized

  • 0

I have a WCF service hosted that is returning a byte[] of protobuf-net serialized data. Originally this was hosted over the default webHttpBinding settings (SOAP) and everything was working properly. I recently found out that I need to call HTTP GETs and POSTs directly from our client so I thought it’d be easier to switch to use a RESTful service. I switched to use the WebGet attribute and the WCF REST Template.

I attempted to create a simple web site to test the client and I’m having trouble deserializing the data. This is an example of how I’m calling the service:

using (WebClient client = new WebClient())
{
    result = client.DownloadString(url);
}    
// Deserialize 
BinaryVehicles binVehs;
using (var ms = new MemoryStream(StrToByteArray(result)))
{
    binVehs = Serializer.Deserialize<BinaryVehicles>(ms);
}

An example of what is returned in “result”:
< base64Binary xmlns=”http://schemas.microsoft.com/2003/10/Serialization/&#8221;>ChsKCzEyMy00NTYtNzg5EgU0NDAwMBoFQmxhY2sKHAoLOTYzLTg1Mi03NDESBTIzMDAwGgZTaWx2ZXI=< /base64Binary>

I also attempted to deserialize the data between the < base64Binary > tags with no results. Does anyone have any idea on how I should go about sending the binary protobuf-net data from an WebGet method and how I should deserialize the data? Thanks.

  • 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-05-15T14:30:20+00:00Added an answer on May 15, 2026 at 2:30 pm

    protobuf-net primarily handles just the serialization aspects (the protobuf spec by Google doesn’t define any further than this). So it really comes down to: how are you serializing it?

    I must admit that the WCF GET approach is not something I’ve looked at hugely, so there is no special handling there. One simple approach may be to look at just returning a string, and handling the base-64 encoding yourself, but to be honest if you are doing HTTP GET, then WCF itself seems overkill.

    I blogged here about using ASP.NET MVC at the server for protobuf via HTTP GET. The linked sample code also includes a wire-compatible ASP.NET implementation.

    If there is something appropriate we can do to make WCF GET easier, I’m all ears…

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

Sidebar

Related Questions

I have a WCF service that is hosted locally. My web.config looks like this:
I have a WCF Service hosted in IIS/ASP.NET that accepts HTTP Post ( not
I have a wcf service that is hosted in IIS. This service launches some
I have a Windows application that is connecting to a WCF Data Service hosted
I have an wcf service that is hosted in II6. The service uses the
We have created a WCF service hosted in a windows service that handles Authentication
I have a wcf service library that is hosted in a windows service. I
I have a WCF service that needs to hosted using basicHttpBinding using SSL. So
I have a C# WCF service DLL that gets hosted by WcfSvcHost.exe when I
I have a piece of code that calls a WCF service that is hosted

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.