您的位置:首页 > Web前端 > JavaScript

add .json handler support in IIS 7

2015-10-20 14:10 567 查看
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.

Open IIS Manager

Display properties for the IIS Server

Click MIME Types and then add the JSON extension:

File name extension: .json

MIME type: application/json

Go back to the properties for IIS Server

Click on Handler Mappings

Add a script map

Request path: *.json

Executable: C:\WINDOWS\system32\inetsrv\asp.dll

Name: JSON
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: