将 Wcf 与 gzip 压缩结合使用
我们有一个需要大量数据的wcf服务。作为要求,我们希望对请求对象进行 gzip 压缩并使用相同的压缩响应它们。我该怎么做?我找不到任何描述这个问题的文档。
我如何开发一个像这样工作的 wcf 肥皂服务以及如何使用这种服务?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Microsoft 有一个示例演示了这一点(您可以编译他们的代码,然后将其插入您的应用程序)
GZip 编码器示例
这里的 WCF/WF/Cardspace 示例中有一个更完整的示例:
Windows Communication Foundation 示例
如果您查看 WCF /Extensibility/MessageEncoder/Compression,有一个更完整的示例,其中包含示例客户端和服务器
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
好文章:使用服务帐户在 IIS 6 和 IIS 7 中进行 HTTP 压缩
检查: HTTP 压缩
启用 Gzip IIS 6.0 中针对 ASP.NET 2.0 网站的压缩
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