Home >Web Front-end >JS Tutorial >Detailed explanation of IIS parsing json configuration usage

Detailed explanation of IIS parsing json configuration usage

php中世界最好的语言
php中世界最好的语言Original
2018-04-25 13:38:502091browse

This time I will bring you a detailed explanation of the use of IIS parsing json configuration. What are the precautions for IIS parsing json configuration? The following is a practical case, let's take a look.

IIS6.0

1. Open IIS and add Mime items

Associated extension:

*.jsonContent type ( MIME): application/x-JavaScript

2. Add mapping:

Right click on the location corresponding to the IIS site

Properties : "Home Directory"-"Application Settings"-"Configuration"-"Mapping"-"Add" will open "Add/Edit Application Extension Mapping"Extension:
.json Run file:
C:\WINDOWS\system32\inetsrv\asp.dllAction: GET,POST

IIS7.x IIS8

1. "Add" a file extension with ".json" in "MIME Type", and the MIME type is text/json (it can also be application/x-javascript)

2. Then "Add Script Mapping" in "Handler Mapping", the request path is: *.json, and the executable file is C:/Windows/System32/inetsrv/asp.dll.

If asp.dll is not found, go to Control Panel-->Programs-->Turn Windows features on and off--->InterNet Information Services--->World Wide Web Services-->Applications Program development function, open "ASP Support". Open it immediately and you can find the asp.dll file.

Content type (MIME): text/json

Then we access: http://localhost/xxx.json through the browser, and the json data should be displayed. If a download prompt appears, check the above Are there any spelling errors in the steps? If not, restart the computer and it should be fine.

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to other related articles on the php Chinese website!

Recommended reading:

jquery implements the mouse prompt function of the navigation menu

jquery css3 implements mouse and form interaction

The above is the detailed content of Detailed explanation of IIS parsing json configuration usage. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn