views:

249

answers:

3

Hi,
we hosted WCF services in IIS 5.1 wndows xp sp3 with httpBasicBinding.
The data tranferered is huge in size and transfered every 1 minute.

For this to less data transfer Is it possible to compress the response of WCF service by using default http compression ? Can I have some sample code / article for using http comression in WCF? Thanks
nRk

A: 

See here: http://social.msdn.microsoft.com/forums/en-US/wcf/thread/5c67b0da-9e50-4ee1-b7ac-a4733c580980/

Anyway, have you considered compressing the data before it is sent, and uncompressing it back upon reception?

Konamiman
A: 

There's a project on Codeplex available, I've used it successfully in projects.

BennyM
Thank Benny for quick reply.There it is indicating custom binding, If I custom binding, can this WCF service will be able accessed by .net 2.0 clients?
nRk
In the 2.0 world (on both client and server) I've added compression to webservices by using a SoapExtension. If you use this WCF extension you'll have to find a way on your 2.0 .NET client to decompress/compress your requests / responses. If it's soap, a SoapExtension would be the right place to do that.
BennyM
A: 

Another option would be to explore the streaming capabilities of WCF: http://msdn.microsoft.com/en-us/library/ms731913.aspx

Adam Fyles