4

I'm attempting to enable gzip compression on my web server. I've installed the dynamic compression module on the server and enabled it in IIS. Now I'm attempting to specify dynamicTypes to include application/json. I followed these steps. I successfully added the dynamics types at the server level. When I checked my app, I noticed the response headers still did not include gzip. I then went back into IIS to confirm the configuration editor settings at the server were inherited for my site. At the site level, I do no see an httpCompression node in the drop down under the system.webServer section. A colleague with IIS10 (I have IIS8) is able to see the system.webServer/httpCompression node.

Any idea why I'm not seeing that node? I believe this is responsible for gzip not working in my setup.

Community
  • 1
  • 1
mellis481
  • 4,332
  • 12
  • 71
  • 118

2 Answers2

0

That's strange you don't see it. Try reinstalling compression modules(dynamic and static). Apart from that make sure you have below under your system.webServer

<urlCompression doDynamicCompression="true" doStaticCompression="true" />
Ravi A.
  • 2,163
  • 2
  • 18
  • 26
  • From Server Manager, I can't see how I would uninstall the dynamic and static compression features (so I could re-install them). The checkbox is grayed out. – mellis481 Aug 30 '16 at 17:35
  • That shouldn't happen. I hope you are administrator on the server machine. – Ravi A. Aug 30 '16 at 17:56
  • I am an admin. Would I need to stop IIS or something? Could that be the reason I can't reinstall the compression modules? – mellis481 Aug 31 '16 at 13:41
  • Not really.Looks like installation got corrupted or something.Can you add screen print on where exactly you seeing it as disabled? – Ravi A. Aug 31 '16 at 14:24
  • Oh that's Add Roles wizard you need to use Remove Roles Wizard. Under Manage -> Remove Roles and Features – Ravi A. Aug 31 '16 at 14:31
  • I removed, restarted, installed, restarted, and I still don't see it. :\ – mellis481 Aug 31 '16 at 15:39
  • Well I tested on one of my VM and I don't see httpcompression at site level and still compression works. So I guess it's something and unfortunately even I am not really sure what else to try. – Ravi A. Aug 31 '16 at 15:46
  • Thanks for contributing. I just figured out the issue and posted the answer. – mellis481 Aug 31 '16 at 17:35
  • what *file* should contain that code? "below under your system.webServer"?! – serge Apr 27 '17 at 08:25
  • Appliation's web.config – Ravi A. Apr 27 '17 at 08:44
0

I just figured out what the problem was. First, there seems to be a difference between versions of IIS (IIS6 and IIS10 in my case) in that some (newer) versions have an system.webServer/httpCompression on the site, not just the server. I thought that was the reason dynamic caching seemed to not work on our dev server but did work on a colleague's machine with IIS10.

It turns out the reason I wasn't seeing a gzip encoding reference in the response headers is because of IE, IE10 to be exact. Our dev environment currently has a certificate problem and you can only open the app in IE. I have IE10 and it does not appear to display any information on the response headers about compressed encoding. I had my colleague with IE11 hit our app in the dev environment and he sees the gzip encoding reference in the response headers.

This is why I hate IE...

mellis481
  • 4,332
  • 12
  • 71
  • 118