在Visual Studio 2010中使用C#web服务的客户端压缩 [英] Using compression with C# webservice client in Visual Studio 2010

查看:158
本文介绍了在Visual Studio 2010中使用C#web服务的客户端压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我调用使用C#和Visual Studio 2010中VS2010负责生成客户端代理代码时,我提供链接到WSDL的web服务。有没有配置客户端代码来设置'的Accept-Encoding头(gzip的,放气)和压缩处理来自服务器的响应的方法吗?如果不是这样,我该怎么办编写自定义代码来处理呢?

I'm invoking a webservice using C# and Visual Studio 2010. VS2010 takes care of generating the client proxy code when I provide the link to the WSDL. Is there a way to configure the client code to set the 'Accept-Encoding' header to (gzip, deflate) and handle compressed responses from the server? If not, how do I write custom code to handle this?

推荐答案

尝试的这个。它是在使用压缩功能的WCF服务的文章。我在做,你有两个服务和客户端的控制的假设(可能不正确)。如果这是别人的服务,您不能执行哈利波特并使其神奇压缩,除非他们已经编写了这种可能性。如果你在两端的完全控制,可以使魔术发生。 ; - )

Try this. It is an article on using compression with a WCF service. I am making the assumption (possibly incorrect) that you have control of both the service and the client. If this is somebody else's service, you can't perform a Harry Potter and make it magically compress, unless they have coded that possibility. If you are in complete control of both ends, you can make the magic happen. ;-)

这篇关于在Visual Studio 2010中使用C#web服务的客户端压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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