wcf basichttpbinding中的gzip压缩 [英] gzip compression in wcf basichttpbinding
本文介绍了wcf basichttpbinding中的gzip压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们可以使用wcf以压缩格式传输数据。
我正在使用wcf服务。
Hi,
Can we transfer data in compressed format using wcf.
I'm using wcf service.
<behaviors>
<serviceBehaviors>
<behavior name="MyBehaviour">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="true" />
<dataContractSerializer maxItemsInObjectGraph="2147483647" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="Manager.Mobile.WebService.MyService" behaviorConfiguration="MyBehaviour">
<endpoint name="MyServiceEndPoint" address=""
binding="basicHttpBinding"
bindingConfiguration="MyServiceBinding"
contract="Manager.Mobile.WebService.IMyService" />
<endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
</service>
</services>
<bindings>
<basicHttpBinding>
<binding name="MyServiceBinding"
receiveTimeout="00:05:00"
sendTimeout="00:05:00"
openTimeout="00:05:00"
closeTimeout="00:05:00"
transferMode="Streamed"
bypassProxyOnLocal="false"
useDefaultWebProxy="true"
maxBufferSize="2147483647"
maxReceivedMessageSize="2147483647"
maxBufferPoolSize="2147483647">
<readerQuotas maxDepth="2147483647"
maxStringContentLength="2147483647"
maxArrayLength="2147483647"
maxBytesPerRead="2147483647"
maxNameTableCharCount="2147483647" />
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
推荐答案
Microsoft为您提供了一个示例: http://msdn.microsoft.com/en-us/library/cc138373%28v=vs.90%29.aspx [ ^ ]
Microsoft has a sample for you: http://msdn.microsoft.com/en-us/library/cc138373%28v=vs.90%29.aspx[^]
这篇关于wcf basichttpbinding中的gzip压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文