New to Kendo UI for jQueryStart a free 30-day trial

404 Status Code Is Thrown for JSON Files on IIS

Environment

ProductProgress® Kendo UI® for jQuery
Kendo Version2017.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
    <?xml version="1.0"?>
    <configuration>
        ...
        <system.webServer>
            ...
            <staticContent>
                <remove fileExtension=".json" />
                <mimeMap fileExtension=".json" mimeType="application/json" />
            </staticContent>
        </system.webServer>
    </configuration>

See Also