using Proto buf in WCF

原创 2013年12月02日 17:29:52

Step 1: download Protobuf  and ref in prj , url :


Step 2: Simply change DataContract -> ProtoContract
DataMember -> Protomember (orderNo)

    public class CompositeType
        bool boolValue = true;
        string stringValue = "Hello ";
        public bool BoolValue
            get { return boolValue; }
            set { boolValue = value; }
        public string StringValue
            get { return stringValue; }
            set { stringValue = value; }



版权声明:本文为博主原创文章,未经博主允许不得转载。 举报


不要在using语句中调用WCF服务 如果你调用WCF服务时,像下面的代码这样在using语句中进行调用,需要注意一个...

Internet – Web to Remote WCF Using Message Security (Original Caller)

Internet – Web to Remote WCF Using Message Security (Original Caller) - J.D. Meier , Jason Taylor ...




如果你调用WCF服务时,像下面的代码这样在using语句中进行调用,需要注意一个问题。using (CnblogsWcfClient client =new CnblogsWcfClient()){ ...

[WCF] Could not find default endpoint element that references contract 'xx' in the ServiceModel

Background: I have a WCF service which is being hosted in IIS. I have a WCF a common library to invo...
  • wzhiu
  • wzhiu
  • 2014-05-28 10:31
  • 2748

How to: Host a WCF Service in a Managed Windows Service How to: Host a WCF Service in a ...

WCF 4 Step By Step Chapter 4 Note (Transport and Message Security + Authentication in Organization)

When building Web services, you can perform authenticationand encryption at two points when sending ...

First WCF App (Host in Console Application)

File Structure Program.csService.csIService.csApp.config 1. App.config Here defines two a...

Instancing modes in WCF

1.什么是Instancing modes? 通过上图我们可以了解到,客户端每次向WCF服务发送请求的时候,会首先在WCF服务端生成一个服务实例,然后通过服务实例来回应客户端的请...

code4fun:host wcf service just in time 当ServiceContract非常多的情况下,比如...

New in WCF 4.0 Note & Filters for Message Logging Note Using Filters for Message Logging         ...