Build your professional network on facebook via our app Go to app
 
 
 
Activity:  1 comments  525 views  last activity : 01 30 2011 09:33:23 +0000
Share
 
 
 

HTTP Compression in IIS v7 (Windows 2008)

In IIS v6 HTTP compression is configured on a file type by file type using the file type extension whereas in IIS v7 it's configured using MIME types. IIS v7 also adds some additional capabilities such as allowing the generated HTML markup from ASP.NET to be compressed before being added to the page output cache & also to dynamically set when compression is switched on/off based on how stressed the CPU is.

Thankfully the MIME types we're interested in area already configured so there's nothing for us to add there like we had to in IIS v6.

  • To set the compression level, open the C:\Windows\System32\inetsrv\config\applicationHost.config file and jump to the section (around line 574). Add the dynamicCompressionLevel attribute to the node like this:

     

  • Next, tell IIS v7 to add compressed pages to the ASP.NET page output cache instead of deferring the caching until the request pulls it from cache:

    APPCMD.EXE set config –section:httpCompression /dynamicCompressionDisableCpuUsage:90

    APPCMD.EXE set config –section:httpCompression /dynamicCompressionEnableCpuUsage:1

  • Finally, configure IIS v7 to dynamically turn caching on/off based on the utilization of the server... below I'm telling it to only compress when the CPU utilization is between 1-90%:

    APPCMD.EXE set config –section:urlCompression /dynamicCompressionBeforeCache:true

Take one last thing into consideration: your mileage may vary. What I mean by this is that *every* environment, site and usage is different. The settings I list here may or may not work for you. Like any performance optimization process, you need to adjust the tuning knobs, test and analyze the results to find what works best for your environment. I'm using a compression level of 9 simply to show how much it can help you. I've heard some say don't go above 4... personally I don't see why you shouldn't go as high as you can as long as the CPU can handle it. So again... your mileage may vary.

Happy caching!

dedicated server
computer help

 
1 comments on "iis7 enable compression for asp and aspx pages "
  Commented by  sumitra dutta, Consultant, Keane    | 02 17 2010 09:41:54 +0000
Thanks again for your informative insight..
Add your comment on "iis7 enable compression for asp and aspx pages "

Rate:
Submit
Leading executive search firm
  • Create a confidential Career Profile and Resume/C.V. online
  • Get advice for planning their career and for marketing of experience and skills
  • Maximize awareness of and access to the best career opportunities
Viewers also viewed
PHP vs ASP.NET
 
0 referals 10 arguments, 2738 views
After a cluster of disconcerting e-mails and documents surfaced last week from climate...
 
267 referals 5 comments, 67 views
So g+ is trying hard to survice now we have brand pages on g+ too. To add to this they have...
 
2255 referals 5 arguments, 204 views
more...  
Recent Knowledge (72)
By Lori Bongiorno How much radiation does your cell phone emit? It's easy to find out the answer...
479 referals 15 comments, 11410 views
  A day after he resigned, Santosh Sarode (31), a software engineer, allegedly strangled his...
1600 referals 32 comments, 1538 views
By Elaine Watson, It is “unfortunate” and “disappointing” that a new manufacturer-driven food...
 
0 referals 7 comments, 362 views
more...  
More From Author
While installing payment gateway on windows server with java. its useful.
Tips for avoid sleepiness During the Day at work
After deciding on a property,the next big thing one does is to look for a good home loan. While people think that there is no big deal in getting a home loan with Bank waiting in queue to offer home loans. getting home loan is very difficult.
more...