Its a big headache to make the http compression and url rewriting to get working at same time.
Even though some valuable posts on it are available like: http://codeblog.shawson.co.uk/iis7-urlrewrite-outbound-links-with-compression-enabled/; there is a lot of R&D and trials required to make it working in ASP.net 4.5 (VS.net 2012)
I did the same and I made it working. I verified the results in Fiddler, Yslow like tools and all of my site aspx pages are now GZIP compressed. Now the page traffic has increased by 100% and obviously the page size also got reduced by an unbelievable margin….
Steps to follow are:
1. Modify the urlcompression node value as:
<urlCompression doStaticCompression=”true” doDynamicCompression=”true” dynamicCompressionBeforeCache=”false” />
2. Make sure the rewrite modules in module list is right at the bottom , when the ‘View Ordered list’ is clicked in IIS -> Rewrite Module node
3) Modify the registry as:
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v LogRewrittenUrlEnabled /t REG_DWORD /d 0
4) Restart IIS once the reg key is changed
Thats all !!!!