Configure IIS to support. JSON-formatted files

Source: Internet
Author: User

First, IIS 6

1. MIME settings:
In the HTTP header settings for the IIS site properties, click "File Type"-"new Type" in the MIME map to add a file type:
Association extensions: *.json
Content Type (MIME): Application/x-javascript

2. Script Map Handler settings:
Or in the site properties of IIS, home directory-Application Settings-configuration-mappings-Add, opens the Settings page for Add/Edit application extension mappings
Extension:. JSON
Run File: C:\WINDOWS\system32\inetsrv\asp.dll
Action: Get,post

3. Save, restart the IIS service, and you will be able to access the JSON file.

Note: If the above steps are complete or not, check that your IIS has no ASP support enabled.

II. IIS 7 +

1, IIS must turn on ASP support, if your IIS default does not support ASP, then go to the Control Panel-program-Open or close Windows features--internet information Services-World Wide Web services-application development features, select ASP, and then determine.

2, open the ASP support, enter the control Panel-system and security-management tool--internet Information Service Manager, turn on "MIME type". Click Add, extension Write ". JSON" "Do not quote", MIME type write "Application/x-javascript" "Do not quote", and then OK.

3. Open "Handler mapping", click "Add script Map", Request path Write "*.json" "Do not quote", executable file "C:\Windows\System32\inetsrv\asp.dll" "Browse window to locate the file", name write "JSON" , then open the request limit--predicate--one of the following predicates, fill in "Get,post" "Do not quote", two times will be prompted after the confirmation, click "Yes", and then restart IIS.

4, through the browser access: Http://localhost/xxx.json, should be able to display the JSON data, if prompted to download, check the above steps for spelling errors, if not, restart the computer, should be able to.

Configure IIS to support. JSON-formatted files

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.