Asp.net-Mvc-4
HTTP 錯誤 404.3 未找到
我正在閱讀本教程。我將此設置作為 MVC4 項目。這是我使用 Vs 2013 製作的第一個項目。
當我從phones.json 收集json 時,我正在一步。我得到了錯誤。
HTTP Error 404.3 -Not found The page you are requesting cannot be served because of extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.這也是我對 json 文件的呼叫
$http.get('Data/Phones/phones.json').success(function (data) { $scope.phones = data; })這是我的文件夾結構的圖像
將此添加到項目的 web.config 中:
<system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/json" /> </staticContent> </system.webServer>
