Adding MIME type in IIS
-
- Posts: 32
- Joined: Fri Jul 25, 2014 5:21 am
Adding MIME type in IIS
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.
-
- Site Admin
- Posts: 5361
- Joined: Sun Aug 22, 2010 4:28 am
Re: Adding MIME type in IIS
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
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
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
Who is online
Users browsing this forum: No registered users and 100 guests