Using Wcf with gzip compression

2019-07-04 11:27发布

We have a wcf service that takes large amount of data. As a requirement we want to take the request objects gzipped and response them using the same compression. How can I do this? I couldn't find any document describing this issue.

How can I develop a wcf soap service that works like that and how to consume this kind of services?

2条回答
做个烂人
3楼-- · 2019-07-04 11:55

Microsoft has a sample that demonstrates this (you can compile their code, and simply plug it into your application)

GZip Encoder Sample

There is a more complete sample in the WCF/WF/Cardspace samples here:

Windows Communication Foundation Samples

If you look in WCF/Extensibility/MessageEncoder/Compression, there is a more complete sample with an example client and server

查看更多
登录 后发表回答