Get IIS6 to serve JSON files (including POST, GET)?

By default, IIS6 does not serve .json (without a MIME template).

Therefore, 404 was not found. Then I add a new MIME type (.json, text/plain or application/x-javascript or application/json) that works fine.

However, when you then add a new mapping (Home Directory -> Configuration -> Add) with .json, C:\WINDOWS\system32\inetsrv\asp.dll , " GET,POST " and try to go to the file, you will get 404.

If you remove the mapping and try and POST or GET to it, you will get 405 .

...

Suggestions?

+53
json iis iis-6
Dec 02 '08 at 3:48
source share
3 answers

By default, IIS in W2K3 and above will not service files that do not have the MIME type that it knows about (instead, they return 404 errors).

You need to add the MIME type to IIS so that it can serve this file type. You can install it at the site level or at the server level.

To install this for the entire server:

  • Open the properties for the server in IIS Manager and click MIME Types.
  • Click Create. Enter "JSON" for the extension and "application / json" for the MIME type.



Update

Given that this post is in Sencha's Getting Started Guide, I thought it was worth the steps.

Win 7 Enterprise SP 1 with 64-bit IIS has different perspectives. So the steps are:

*. Open IIS Manager. Then you will get the following window.

enter image description here

*. Right click MIME and select open feature

*. Click "ADD" in the upper right corner of the "Actions" menu.

enter image description here

*. Rest on Evan.

+106
Jul 13 '09 at 18:04
source share

Verify that Active Server Pages are enabled under the Web Service Extensions section of the IIS configuration.

IIS Manager -> (local computer) -> Web Service Extensions -> Active Server Pages

+2
Jul 13 '09 at 15:07
source share

If you do not have IIS installed, obviously you will want to install it before starting IIS Manager. I need (in Windows 7) go to: "control panel / program and functions", then click "enable or disable Windows functions"

Link: http://www.howtogeek.com/howto/windows-vista/how-to-install-iis-on-windows-vista/

It seems that starting IIS Manager is different for different systems. I started / ran / inetmgr.

Link: http://msdn.microsoft.com/en-us/library/bb763170(v=vs.100).aspx

Link: http://technet.microsoft.com/en-us/library/cc770472(v=ws.10).aspx

Troy Freikiks. #

+1
Jun 30 '13 at 12:00
source share



All Articles