IIS Express中添加MIME
作者:互联网
>cd C:\"Program Files"\"IIS Express"
>appcmd set config /section:staticContent /+[fileExtension='.mjs',mimeType='text/javascript']
会提示:
已经在配置提交路径“MACHINE/WEBROOT/APPHOST”向“MACHINE/WEBROOT/APPHOST”的“system.webServer/staticContent”节应用了配置更改
或者在web.config下添加
<system.webServer>
<staticContent>
<mimeMap fileExtension=".mjs" mimeType="text/javascript" />
</staticContent>
</system.webServer>
标签:APPHOST,MACHINE,IIS,Express,staticContent,MIME,config 来源: https://www.cnblogs.com/imust2008/p/15797852.html