In .NET 2.0 the property .EnableDecompression was added which will allow you to use IIS 6 Native Compression in your smart client application. The following article explains how to implement compression in your application and how to configure IIS 6 to support compression of asmx web services.
Step 1:
Configure client side code to allow for compression/decompression. For your client application you must first generate a proxy class that will allow you to connect to your web service. To do this, you can use the wsdl.exe tool and pass in your web service WSDL:
Next, add the proxy class to your project, instantiate your proxy and set the EnableDecompression property to true:
Step 2:
Enable compression on the Web Services IIS server.
1. On the IIS server, open Inetmgr, right click on the web site node and select properties. Click on the Service tab.
2. Under the HTTP compression section, check “Compress application files” and “Compress static files” click Apply – OK.
3. Click on Web Service Extensions.
4. Click “Add a new Web service extension” and add the gzip.dll extension.
Finally - Add the asmx extension to your HcScriptFileExtensions collection by running the following adsutil.vbs statement:
Verify that compression is working by using Fiddler and checking the response body of your web service call. Check the transformer section and look for the HTTP Compression section.
Findings:
For more information see the following:
http://msdn.microsoft.com/en-us/library/system.web.services.protocols.httpwebclientprotocol.enabledecompression.aspx
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d52ff289-94d3-4085-bc4e-24eb4f312e0e.mspx?mfr=true
James Beeson
Performance Technologist
Microsoft – ACE Team
PingBack from http://www.easycoded.com/improving-smart-client-performance-using-iis-6-native-compression/
James!
Very cool - thanks for sharing this.
The result is impressive when applying compression.
alikl
Is there a critical point after which the compression gains would be undermined by the uncompression load on the CPU?
That’s a great question Kris, I did see a small CPU increase on the server while load testing this scenario using VSTS, however it was difficult to tie this to compression directly as the throughput of the application doubled. More testing is required to find the critical point but I would consider adjusting the HCDynamicCompressionLevel down to lower CPU impact if needed.
196 Microsoft Team blogs searched, 97 blogs have new articles in the past 7 days. 218 new articles found...