如何通过web.config设置mime规则允许下载文件

最后更新时间:2024-09-12 14:58:01

<configuration>
<system.webServer>
  <staticContent>
    <remove fileExtension=".apk" /> //避免错误,先移除IIS本地设置
    <mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" /> //设置要下载的文件后缀
  </staticContent>
</system.webServer>
</configuration>