Pablo M. Cibraro (aka Cibrax)

My thoughts on Web Services and .NET development

News

Pablo Cibraro's VisualCV

Blogs

Personal

Programming

WS-Compression for WCF

I have developed a new WS-Compression implementation for WCF.  This code is based on the WSE 3.0 implementation  made by my partner Rodolfo Finochieti.

 

Some features provided by this implementation:

 

  • Message body compression
  • Different compression algorithms (GZIP, Deflate)
  • Different compression levels
  • Support to enable compression by means of configuration or code

 

You can download it from here

UPDATED: A new version for the WCF september RC is available here

Enjoy :)

Posted: Mar 29 2006, 03:57 PM by cibrax | with 11 comment(s)
Filed under:

Comments

Dileep Agarwal said:

Hi,
Could you please send any document on this. I am usig Feb CTP and in config file m getting below error: <compression .. is not a valid element.

also in WSCompression.cs u are using some static class variable having link to the weblogs. I am not able to understand these llso.

Waiting for your response
Dileep Agarwal
# April 14, 2006 10:26 AM

Cibrax said:

Hi Dileep,


Unfortunately, I did not have time to prepare any documentation for this sample.

It was originally created by my partner Rodolfo for WSE 3.0, and I have only moved to WCF. The error in the configuration is a quite strange, does it prevent the application from running or is it a Visual Studio Warning ?. Your configuration should have a BindingExtension section to define the "compression" element.

The static variables are XML namespaces and they should not be considered as links (In this case, my colleague Rodolfo used his weblog url as namespace, but it is just a coincidence and you can use change those namespaces to use other namespaces).

I will let you know when I have some documentation.

Thanks

Pablo

# April 18, 2006 10:00 AM

Jithendrian. R said:

i am trying to send attachments from my client app to my service app in WCF with the help of the samle provided above. I am using Beta2. But when i try to add service reference to the client in that sample i am getting an exception stating "Compression Header is missing" in "AsyncResult.cs" file. Could someone let me know on which CTP the sample was developed on? . let me know is there any other sample available for sending the attachments?.
# September 25, 2006 2:58 AM

Andres said:

I have problems using this code on Named Pipes transport, have you tested this code on this transport? Thanks, Andrés.
# October 11, 2006 7:15 PM

cibrax said:

Hi Andres,

No, I haven't tested the code with that transport. The code is hooking up in the transport layer (Bindings) to compress the message, and that can bring many problems. I planning to move the compression functionality to the service layer (Behaviors). Rodolfo Finocheiti have a version implemented in that layer, http://prototypes.shockbyte.com.ar/misc/IndigoWSCompressionBehavior.zip

# October 12, 2006 10:10 AM

CTXAmn said:

When I inspect the WCF Trace I get *Stream* instead of the parameters, unless I return a buffered copy of the message.(see code below)

Any ways to optimize it?

.

.

originalMessage.Close();

// Force display of the parameters into the WCF logs

MessageBuffer buffer = message.CreateBufferedCopy(int.MaxValue);

message = buffer.CreateMessage();

buffer.Close();

# March 28, 2007 4:08 PM

我是蚂蚁 said:

在.net3.0出现以前我们进行分布式开发式有两个选择一个是webservice,另一个是remoting;

# December 4, 2007 9:05 PM

龍龙 said:

原文:www.cnblogs.com/.../982534.html

在.net3.0出现以前我们进行分布式开发式有两个选择一个是webse...

# April 26, 2008 9:12 AM

Ramon said:

Is this based on http 1.1 http compression thus compression on the http transport data and not a custom message?

# August 21, 2008 8:31 AM

reality-refactored said:

WCF Compression- best practices.

# August 29, 2008 11:03 AM

WCF Compression- best practices? « Reality Refactored said:

Pingback from  WCF Compression- best practices? &laquo; Reality Refactored

# July 21, 2009 4:56 PM
Leave a Comment

(required) 

(required) 

(optional)

(required)