使用Wcf与gzip压缩 [英] Using Wcf with gzip compression
问题描述
我们有一个wcf服务需要大量的数据。作为一个需求,我们想要将请求对象gzipped并使用相同的压缩来响应它们。我如何做到这一点?我找不到任何描述此问题的文档。
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.
如何开发一个类似这样的wcf soap服务,以及如何使用这种服务?
How can I develop a wcf soap service that works like that and how to consume this kind of services?
推荐答案
Microsoft有一个演示此示例的示例(您可以编译他们的代码,只需将其插入应用程序)
Microsoft has a sample that demonstrates this (you can compile their code, and simply plug it into your application)
在WCF / WF / Cardspace示例中有一个更完整的示例:
There is a more complete sample in the WCF/WF/Cardspace samples here:
Windows Communication Foundation示例
如果您查看WCF / Extensibility / MessageEncoder / Compression,则有一个包含示例客户端和服务器的更完整的示例
If you look in WCF/Extensibility/MessageEncoder/Compression, there is a more complete sample with an example client and server
这篇关于使用Wcf与gzip压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!