添加如下配置后: <mimeMap fileExtension=".json" mimeType="application/json"/></staticContent></system.webServer>它就像一个魅力.完整的安装文件示例:<配置><system.web><编译调试="true" targetFramework="4.0"/></system.web><system.webServer><mimeMap fileExtension=".json" mimeType="application/json"/></staticContent></system.webServer></配置>I have the problem, that the IIS from Visual Studio Express 2013 for Web doesn't allow the loading of *.json files. When trying to load a *.json file I get a 403 Forbidden and a help page how to configure the IIS allow the loading of JSON files, but don't know what to do with this information / where the IIS is even located.This is the error page: 解决方案 After some more googling, and experimenting I found out, that you have to define IIS settings in the Web.config.After adding the following configuration: <system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/json" /> </staticContent> </system.webServer>it works like a charm.Full setup file example:<?xml version="1.0"?><configuration> <system.web> <compilation debug="true" targetFramework="4.0"/> </system.web> <system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/json" /> </staticContent> </system.webServer></configuration> 这篇关于允许在 Visual Studio Express 2013 for Web 中加载 JSON 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 08-18 09:36