【问题标题】:MIME Type not working when added with appcmd使用 appcmd 添加时 MIME 类型不起作用
【发布时间】:2013-09-24 16:57:25
【问题描述】:

当我使用 appcmd 通过以下代码将 MIME 类型添加到 IIS 7 时,它会显示在列表中但不起作用。

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

如果我通过 IIS GUI 添加它,它会按预期工作。但是,我需要为服务器部署编写脚本,所以我需要知道如何使它与 appcmd 一起工作。

【问题讨论】:

    标签: iis-7 mime-types appcmd


    【解决方案1】:

    试试这个

    appcmd.exe set config "Default Web Site" -section:system.webServer/staticContent /+"[fileExtension='mp4',mimeType='video/mp4']"
    

    【讨论】:

      猜你喜欢
      • 2014-04-05
      • 1970-01-01
      • 2017-06-23
      • 2016-05-12
      • 1970-01-01
      • 2015-01-05
      • 2020-10-03
      • 2012-03-25
      • 2020-03-07
      相关资源
      最近更新 更多