marto
marto

Reputation: 4170

IIS 7 static file compression problem

We have 3 web servers running IIS7. I've enabled compression for static and dynamic content. We have been testing the servers under heavy load and after half an hour the styles on the site started breaking.

I started investigating and found out that IIS was serving css and js files with Content-Encoding: gzip but the actual file content is not compressed. This cause the browsers to give error when trying to process the content. The issue disappears if I restart IIS.

Have anyone experienced a similar issues? What is the best way to diagnose the issue?

Thanks

Upvotes: 8

Views: 2660

Answers (3)

Karl
Karl

Reputation: 6832

Our site was failing to pull JS and CSS in when the page was refreshed after loading.

I switched static file compression off in IIS 7.5, and the site was fine again. This led me to do some investigation into why this might be happening.

For us, the problem occurred because the site had some legacy code that programmatically implemented GZIP encoding, and IIS 7.5 was conflicting with it. We removed the legacy code, and switched static file compression back on.

Upvotes: 0

marto
marto

Reputation: 4170

The problem was caused by the CMS (sitecore) we were using. We upgraded to a later version and it has worked ever since. It's probably a 3rd party httpmodule causing the issue.

Upvotes: 1

Tomcat
Tomcat

Reputation: 92

Did you have a look at http://support.microsoft.com/kb/969062 ?

KR, Thomas

Upvotes: 0

Related Questions