嘗試在瀏覽器直接開啟 .ini 等靜態檔案時,IIS 回傳 HTTP 404.3 Not Found,提示:「由於擴展配置問題而無法提供您請求的頁面。如果該頁面是腳本,請添加處理程序。如果應下載文件,請添加 MIME 映射。」
IIS 預設不識別 .ini 副檔名,缺少對應的 MIME 類型映射,導致無法正確提供檔案下載。
.ini)與 MIME 類型(如 text/plain 或 application/octet-stream)。| 副檔名 | MIME 類型 |
|---|---|
| .ini | text/plain |
| .json | application/json |
| .woff | font/woff |
| .woff2 | font/woff2 |
| .apk | application/vnd.android.package-archive |
Startup.cs 中配置 StaticFileOptions 的 ContentTypeProvider。