HTTP Error 404.3 – Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

Freelance的那個 ASP.Net MVC 5 Project 上加了一些新的 CSS 檔案..
當中有一些 CSS 檔是reference 了到一些 Font 既檔案上 “.woff2
誰不知 Default的 ASP.Net MVC 沒有config可以 serve 這個file extension
所以嘗網頁嘗試 Load 這個 file 是便出現 HTTP 404.3 Not Found

HTTP Error 404.3 – Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.”
HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.

解決方法十分簡單
我們只需要在Web.config上 加上容許那些MIME 檔案 extension便可以了

  <system.webServer>
 <staticContent>
 <mimeMap fileExtension=".woff2" mimeType="application/font-woff2" />
 </staticContent>
 </system.webServer>

Web.config add supported MIME type
Hope you find it useful

Leave a Reply