IIS7 and dynamic compression of .aspx and .js files

Posted on 2010-04-08
Medium Priority
Last Modified: 2012-05-09

I have a setup of 2 web servers with a shared configuration file. (IIS7 on windows 2008 server)

We found out we needed to compress some of our web content and therefore added the compression/dynamic compression features for IIS7.

in our web.config we added this: (see code snippet below)

i checked that the compression part is enabled on both servers and that they sync as they are supposed to.

But with the above config file it compresses everything except the .aspx and .js files as its supposed to. Images, and everything else gets compressed, just not my .aspx/.js files. I even tried adding .aspx as a mime type (i know im not supposed to do this!) just to see if it would get it working. It did not.

Btw i use yslow to test if it compresses the .aspx file. (firefox plug-in)

Anyone have any suggestions ?

EDIT:Added screen shot of the yslow test. Added some text to show the google analytics part. That one is obviously not on my server :) - and don't mind the gzip sizes. your first concern is to just get it working.
		<urlCompression doDynamicCompression="true" doStaticCompression="true" dynamicCompressionBeforeCache="true" />
				<clear />
				<remove name="X-Powered-By" />
				<add name="ETag" value=" " />
			<clientCache httpExpires="Sun, 29 Mar 2020 00:00:00 GMT" cacheControlMode="UseExpires" />
		<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files" doDiskSpaceLimiting="true" maxDiskSpaceUsage="2000" minFileSizeForComp="0">
			<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
				<add mimeType="text/*" enabled="true" />
				<add mimeType="image/*" enabled="true" />
				<add mimeType="message/*" enabled="true" />
				<add mimeType="application/x-javascript" enabled="true" />
				<remove mimeType="*/*"/>
				<add mimeType="*/*" enabled="true" />
				<add mimeType="text/*" enabled="true" />
				<add mimeType="image/*" enabled="true" />
				<add mimeType="message/*" enabled="true" />
				<add mimeType="application/javascript" enabled="true" />
				<remove mimeType="*/*"/>
				<add mimeType="*/*" enabled="true" />

Open in new window

Question by:Wraithbone
1 Comment

Accepted Solution

Wraithbone earned 0 total points
ID: 30115076
We found the solution.

As the server had a shared configuration, adding the feature in windows only gave us the files needed to gzip. The file was never loaded by the server.

Fixed this by adding <add name="DynamicCompressionModule" lockItem="true" /> to the applicationHost.config

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…

587 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question