VS调试时JSON格式文件无法加载

 报错:

VS调试时JSON格式文件无法加载

VS调试时JSON格式文件无法加载

解决:在项目中的web.config中进行配置,configuration节中添加以下部份:

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

注意:打包,挂在iis上的时候可能提示这句错误,删除就好。

 

 

  钻研不易,转载请注明出处。

 

相关文章:

  • 2021-09-28
  • 2021-08-17
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-26
  • 2021-11-19
猜你喜欢
  • 2021-10-10
  • 2021-09-13
  • 2022-12-23
  • 2021-06-17
  • 2021-06-28
  • 2021-07-11
  • 2022-01-11
相关资源
相似解决方案