Sometimes we need to create JSON in a text file with extension .json, however by default IIS 7 or any of the IIS are not configure to handle .json extension. So below is a very simple method to do that. You can apply the method on the root of IIS so .json can be handled by every site or virtual folder in the IIS or just to the specific site.

  1. Open IIS Manager
  2. Display properties for the IIS Server
  3. Click MIME Types and then add the JSON extension:
    • File name extension: .json
    • MIME type: application/json
  4. Go back to the properties for IIS Server
  5. Click on Handler Mappings
    • Add a script map
    • Request path: *.json
    • Executable: C:\WINDOWS\system32\inetsrv\asp.dll
    • Name: JSON

add .json handler support in IIS 7的更多相关文章

  1. iMX6QD How to Add 24-bit LVDS Support in Android

    iMX6QD How to Add 24-bit LVDS Support in Android 版本 4 由 Ying Liu 于 2012-10-14 下午11:52创建,最后由 Jodi Pau ...

  2. Jquery+Json+Handler文件结合应用实例

    1.页面script代码-[model数据.字符串] <script type="text/javascript" charset="utf-8" src ...

  3. Caused by: java.lang.ClassNotFoundException: org.springframework.integration.handler.support.HandlerMethodArgumentResolversHolder

    <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring ...

  4. Gradle Goodness: Add Incremental Build Support to Tasks

    Gradle has a very powerful incremental build feature. This means Gradle will not execute a task unle ...

  5. Gradle Goodness: Add Incremental Build Support to Custom Tasks with Annotations

    In a previous post we learned how we can use the inputs and outputs properties to set properties or ...

  6. No mapping found for HTTP request with URI [/test2/test/add.json] in DispatcherServlet with name 'dispatcher'

    查看spring-mvc.xml中扫描包路径配置是否正确: <!-- 扫描controller(controller层注入) --> <context:component-scan ...

  7. [译] 在Web API 2 中实现带JSON的Patch请求

    原文链接:The Patch Verb in Web API 2 with JSON 我想在.NET4.6 Web API 2 项目中使用Patch更新一个大对象中的某个字断,这才意识到我以前都没有用 ...

  8. 配置IIS支持Json格式

    配置iis支持.json格式的文件 原文地址:http://blog.eroad.info/iis-suport-json/ 在做easyUI的官方示例的时候 有的例子是直接读取的json文件,但是默 ...

  9. IIS支持json、geojson文件

    最近在搞asp.net + openlayers. 其中openlayer有个数据源支持 .geojson 数据,但是怎么测试都不能成功.同样的数据拿到php下就能成功显示. 搓. 在网上漫无目的的搜 ...

随机推荐

  1. Memcache的使用基本介绍

    Memcache学习总结2-Memcache的使用基本介绍 上一次总结中我们已经安装部署好了Memcached,并且把PHP扩展Memcache也安装好了,这一节我们详细学习一下PHP扩展Memcac ...

  2. UISwitch(开关控件)、UISegmentedControl(分段控件)

    一.UISwitch 1.初始化 UISwitch *s1 = [[UISwitch alloc]initWithFrame:CGRectMake(50, 170, 100, 200)];   2.设 ...

  3. Mandelbrot和Julia

    概述 mandelbrot julia Mandelbrot 对全体复数z,满足xn+1 =  xn2 + z从x0 = 0起,|x|随n值增加不趋于无穷大,则z属于Mandelbrot集 代码 #i ...

  4. python 常用函数(不定时更新)

    1.遍历文件夹 import os def FileList(rootDir): FL=[] for lists in os.listdir(rootDir): path=os.path.join(r ...

  5. 用nifi把hdfs数据导到hive

    全景图:     1. ListHDFS & FetchHDFS: ListHDFS:   FetchHDFS:   2. EvaluateJsonPath: {"status&qu ...

  6. 微软BI 之SSIS 系列 - Precedence Constraint 详解优先约束的使用

    开篇介绍 Precedence Constraint 优先约束 - 在控制流中使用,用来链接控制流中各种 Task,Container,并且要求满足一定的条件才能执行相关联的 Task 或者 Cont ...

  7. [ucgui] 子窗口父窗口

    它创建了3个窗口: 第一个作为桌面的子窗口 第二个作为第一个窗口的子窗口 第三个作为第二个窗口的子窗口 窗口创建后,使用WM_ForEachDesc()在其父窗口中移动各个窗口: static voi ...

  8. 只有好的棋手才会走运-《打造Facebook》读后感

    王淮的<打造Facebook>一书不厚,花半天时间轻松读完.书中没有大段的说教,只有近乎流水的陈述.正如作者所说,打造Facebook这本书由巴克伯格来写再合适不过.可惜他至少在近几年内没 ...

  9. Javascript中递归造成的堆栈溢出及解决方案

    关于堆栈的溢出问题,在Javascript日常开发中很常见,Google了下,相关问题还是比较多的.本文旨在描述如何解决此类问题. 首先看一个实例(当然你可以使用更容易的方式实现,这里我们仅探讨递归) ...

  10. 微软Dynamics 使用葡萄城的Wijmo 5提供移动端用户界面

    近日,全球最大的控件提供商葡萄城公司宣布: 葡萄城近日与微软公司达成合作,将Wijmo 产品线的HTML5和JaveScript 控件融合到微软Dynamics CRMOnline 2016版中. 随 ...