New to Kendo UI for jQuery? Download free 30-day trial

404 Status Code Is Thrown for JSON Files on IIS

Environment

Product Progress® Kendo UI® for jQuery
Kendo Version 2017.2.621

Description 

A 404 status code is thrown for JSON files on IIS.

Cause

By default, IIS does not serve files with unknown extensions. The mime types can be specified either through the IIS management console (inetmgr) or in the site Web.config.

Solution

The example below demonstrates how to configure the IIS Web.config. Note that, if already defined, the mime is first removed to avoid clashes.

    <?xml version="1.0"?>
    <configuration>
        ...
        <system.webServer>
            ...
            <staticContent>
                <remove fileExtension=".json" />
                <mimeMap fileExtension=".json" mimeType="application/json" />
            </staticContent>
        </system.webServer>
    </configuration>

See Also

In this article