4

Every doc I can find discusses editing applicationHost.config in notepad to enable this.

The real need:

a) Via appcmd.exe or cmd line tool, enable dynamic compression to be configured in web.config (e.g. to set applicationHost.config -> "httpCompression" -> overrideModeDefault= to "Allow"

b) If 'a' cannot be done, then how, via appcmd.exe or cmd line tool, to enable site wide gzip dynamic content compression for mime type application/x-javascript

I just spent half an hour exploring appcmd.exe, and searching the net, and have seen no examples of using appcmd.exe to flip the overrideModeDefault values

  • Before trying to automate the change, have you actually tried whether this works. As I see it, the httpCompression node only works on the server level. I don't think you can override this on the site level and even less likely in web.config. I set httpCompression-overrideModeDefault to allow and added a httpCompression node inside a location node in applicationHost.config. It doesn't make any difference. I can't override the server settings. You can add ' application/x-javascript' to the server level via appcmd. – Peter Hahndorf Mar 16 '14 at 09:15
  • @PeterHahndorf I ran out of time and never was able to experiment. I ended up just editing applicationHost.config by hand, which is horrible. Not happy I could not find a simple way to automate it, at either server or site level. – Jonesome Reinstate Monica Mar 31 '14 at 01:18

1 Answers1

1

Here is the way to unlock it:

cd \windows\system32\inetsrv

appcmd.exe unlock config /section:system.webServer/serverRuntime