1.在DOS窗口下进入IIS Express安装目录,默认是“C:\Program Files\IIS Express”,cmd  命令行cd 到 该目录下

VS2012 IIS Express 添加MIME映射(.json)

2.在IIS Express安装目录下执行命令:appcmd set config /section:staticContent /+[fileExtension='.zyy',mimeType='text/plain']

ps:".zyy"表示文件后缀.变量 fileExtension 字符串是文件扩展名,变量 mimeType 字符串是文件类型说明

例如:appcmd set config /section:staticContent /+[fileExtension='.json',mimeType='application/json']

相关文章:

  • 2021-08-07
  • 2022-12-23
  • 2022-12-23
  • 2021-07-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-08
  • 2021-07-30
猜你喜欢
  • 2021-06-25
  • 2022-12-23
  • 2022-12-23
  • 2022-02-22
  • 2022-12-23
相关资源
相似解决方案