Using Wcf with gzip compression

不羁岁月 提交于 2020-01-04 05:15:08

问题


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?


回答1:


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




回答2:


Good article : HTTP COMPRESSION in IIS 6 and IIS 7 using Service Account

Check : HTTP Compression

Enable Gzip compression in IIS 6.0 for ASP.NET 2.0 websites



来源:https://stackoverflow.com/questions/9130213/using-wcf-with-gzip-compression

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!