使用Wcf与gzip压缩 [英] Using Wcf with gzip compression

查看:329
本文介绍了使用Wcf与gzip压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个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)

GZip编码器示例

在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆