0


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?
nRk

nRk
  • 1,251
  • 7
  • 24
  • 50

3 Answers3

0

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
  • 49,681
  • 17
  • 108
  • 138
0

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

BennyM
  • 2,796
  • 16
  • 24
  • 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 Nov 06 '09 at 13:16
  • 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 Nov 06 '09 at 13:41
0

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

Adam Fyles
  • 6,030
  • 1
  • 23
  • 29