tags:

views:

2330

answers:

3

By default, IIS6 does not serve .json (no wildcard MIME type).

Therefore a 404 not found is thrown. I then add a new MIME type (.json, text/plain or application/x-javascript or application/json) which 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 browse to the file, you get a 404.

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

...

Suggestions?

A: 

On my machine your configuration works without the errors. Have you replicated this behaviour? Can you post the iis log files of the failed requests?

Igal Serban
A: 

Make sure you have Active Server Pages Allowed in the Web Service Extensions section of your IIS configuration.

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

Dan Williams
+3  A: 

By default, IIS in W2K3 and above won't serve files that aren't of a MIME type that it knows about (instead returning 404 errors).

You need to add a MIME type to IIS to allow it to serve that type of file. You can set it at the site level or at the server level.

To set this for the entire server:

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