0

When I add a MIME type to IIS 7 via the following code with appcmd, it shows up in the list but doesn't work.

appcmd set config /section:staticContent /+"[fileExtension='.mp4 ',mimeType='video/mp4']"

If I add it via the IIS GUI it works as expected. However, I need to script this for a server deployment so I need to know how to make it work with appcmd.

Earl
  • 283
  • 2
  • 7
  • 14

1 Answers1

0

try this

appcmd.exe set config "Default Web Site" -section:system.webServer/staticContent /+"[fileExtension='mp4',mimeType='video/mp4']"
Peter Marshall
  • 1,231
  • 1
  • 13
  • 22