kn11n
kn11n

Reputation: 5

How to eliminate mime type by using appcmd.exe

I added encoding mime type of static file for IIS by the following command such as the following. but I do not know how to eliminate the mime type. Please let me know the appcmd command to eliminate mime-type that I added one.

sample : encoding static file

appcmd set config /section:httpCompression /+staticTypes.[mimeType='text/xml',enabled='true'] /commit:apphost

I tried to the following command.

appcmd delete config /section:httpCompression /+staticTypes.[mimeType='text/xml',enabled='true'] /commit:apphost

but it shows error.

Upvotes: 0

Views: 282

Answers (1)

YurongDai
YurongDai

Reputation: 2440

Add mime-type is like this:

appcmd set config /section:httpCompression /+staticTypes.[mimeType='text/xml',enabled='true'] /commit:apphost

Eliminate mime-type is like this: (please note /- instead of /+)

appcmd set config /section:httpCompression /-staticTypes.[mimeType='text/xml',enabled='true'] /commit:apphost

My test result was successful: image

Upvotes: 0

Related Questions