Hi Paolo, In theory you should be able to use the compression with no issues. Be sure to add the IdeaBlade.Core assembly. To add binding programmatically, create the CustomBinding and use the Gzip binding element in place of the usual binding element: ( http://social.msdn.microsoft.com/Forums/en/wcf/thread/2205b22c-b582-4771-a361-ee9b85fc0493 - http://social.msdn.microsoft.com/Forums/en/wcf/thread/2205b22c-b582-4771-a361-ee9b85fc0493 ) var binding = new CustomBinding(new GZipMessageEncodingBindingElement(), new HttpTransportBindingElement());
Or you could simply do it in your config file: (from one of our config file samples in the http://drc.ideablade.com/xwiki/bin/view/Documentation/code-sample-configuration-files - DevForce Resource Center ) <system.serviceModel> <bindings> <customBinding> <binding name="compressedBinaryBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"> <gzipMessageEncoding> <readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" /> </gzipMessageEncoding> <httpTransport maxReceivedMessageSize="2147483647" /> </binding> </customBinding> </bindings> <extensions> <bindingElementExtensions> <add name="gzipMessageEncoding" type="IdeaBlade.Core.Wcf.Extensions.GZipMessageEncodingElement, IdeaBlade.Core"/> </bindingElementExtensions> </extensions> </system.serviceModel> Regards, Silvio.
|