Adding MIME type in IIS

Got a problem you cannot solve? Try here.
AdrianGray
Posts: 32
Joined: Fri Jul 25, 2014 5:21 am

Adding MIME type in IIS

Postby AdrianGray » Wed Nov 18, 2015 1:43 am

I need to ascertain if a virtual IIS folder has a particular MIME type. I can get a site list, and from there ascertain the folder. What I am unable to do is get a list of the registered MIME types to check to see if the one I require is already present. How do you go about this, and if it is not present, how do I add it. Thanks, Adrian.

FrancescoT
Site Admin
Posts: 5361
Joined: Sun Aug 22, 2010 4:28 am

Re: Adding MIME type in IIS

Postby FrancescoT » Wed Nov 18, 2015 1:12 pm

Dear Adrian,

I am not an IIS expert, but you can use the "Evaluate XPath Query" command to query the defined MIME Types within the relative portion of the "applicationHost.config" file.

Then to ADD or to EDIT a MIME TYPE, from the install script you can use a call to the "APPCMD" tool (via Run Program command).
https://technet.microsoft.com/en-us/library/cc725608(v=ws.10).aspx

Anyway for what I see, it may be not necessary to query for the defined types. If the type already exists, the "APPCMD" call will ignore the request.

Hope this helps you.

Regards
Francesco Toscano
InstallAware Software

White Papers (HowTos) - http://www.installaware.com/publication ... papers.htm
Publications - http://www.installaware.com/publications-review.htm
InstallAware Help -F1 anywhere in the InstallAware IDE


Return to “Technical Support”

Who is online

Users browsing this forum: Bing [Bot] and 154 guests