How do you change the allowDefinition section attribute using appcmd in IIS 7?
Posted
by Edward Wilde
on Stack Overflow
See other posts from Stack Overflow
or by Edward Wilde
Published on 2009-04-06T13:45:17Z
Indexed on
2010/03/19
10:01 UTC
Read the original article
Hit count: 568
Is it possible to use appcmd to change the value of allowDefinition? Specifically I'm try to enable changes to the httpCompression module at the application level.
Modifying the applicationHost.config by manually changing the following line:
<section name="httpCompression" allowDefinition="AppHostOnly" overrideModeDefault="Deny" />
To
<section name="httpCompression" allowDefinition="MachineToApplication" overrideModeDefault="Allow" />
allows me to then execute the following appcmd commands:
appcmd set config "website name" /section:httpCompression /noCompressionForProxies:false
appcmd set config "website name" /section:httpCompression /noCompressionForHttp10:false
However I need a solution that does not rely on manually editing the applicationHost.config
© Stack Overflow or respective owner