IIS7 and dynamic compression of .aspx and .js files


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

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WraithboneAuthor Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft IIS Web Server

From novice to tech pro — start learning today.