Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable GZIP compression for POST (upload) requests to a SOAP WebService on IIS 7?

How can I enable compression for POSTed data uploaded to a .NET WebService (SOAP, not WCF)? I thought it would be a simple matter of enabling dynamic compression in IIS but after enabling, it's only compressing the response, not the POST request.

I've added it as a Service Reference and I can't find any settings on the generated SOAPClient to enable compression of requests.

It seems I might be missing a configuration setting or code on the client side to compress the request before sending it to the server? Or is what I'm trying to do (GZipping POST data) not even supported?

Further info: I'm using .NET 4.0 on the client and server.

like image 484
NickG Avatar asked May 21 '13 13:05

NickG


People also ask

How do I enable content encoding GZIP in IIS?

GZip Compression can be enabled directly through IIS. So we go to the “Turn Windows features on or off” and select “Dynamic Content Compression” and click the OK button.

How do I enable gzip content encoding?

Gzip on Windows Servers (IIS Manager)Open up IIS Manager. Click on the site you want to enable compression for. Click on Compression (under IIS) Now Enable static compression and you are done!


1 Answers

I've blogged on that 4 years ago

http://netpl.blogspot.com/2009/07/aspnet-webservices-two-way-response-and.html

I wonder why you haven't found this by googling. Anyway, this should work for you, we have it working in a production environment for 4 years now.

like image 56
Wiktor Zychla Avatar answered Oct 23 '22 17:10

Wiktor Zychla