VS2013新建的web项目不支持直接下载json文件,可以在项目的web.config下插入如下的配置信息。
<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5.1" />
    <httpRuntime targetFramework="4.5.1" />
  </system.web>

  <system.webServer>
    <staticContent>
      <remove fileExtension=".json" />
      <mimeMap fileExtension=".json" mimeType="application/json" />
    </staticContent>
  </system.webServer>
</configuration>

 

 

posted on 2017-06-02 10:19  milooooo  阅读(1151)  评论(1编辑  收藏  举报