I want to enable httpcompression and then add mimetypes to web.config files usng appcmd. I know we can do that from
applicantionHost.config
file. It is enabled by default above IIS7.5
We can verify that from
%windir%\System32\inetsrv\config\applicationHost.config
But what my requirements is to enable and add mime types directly to web.config file(basically override the settings existing in applicationHost.config) using appcmd
You could enable and disable compression for site using below command:
To add a MIME type, use the following syntax:
The variable fileExtension string is a file name extension. The variable mimeType string is a MIME type. For example, to create a MIME type, type the following at the command prompt, and then press ENTER:
More information about adding a MIME type you can refer to this link: To add a MIME type.