Json file cannot be served


#1

If I make a request to get items.json file, server returns

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

You can check it here.

I can access it with php with readfile or fopen, so it IS on the server.

I noticed that the server specifically behaves this way with json files
while serves txt or js files without any problem.

If someone knows what’s the problem, please let me know.


#2

You should register json mime type in your web.config file:

<system.webServer>
    <staticContent>
        <remove fileExtension=".json" />
        <mimeMap fileExtension=".json" mimeType="application/json" />
    </staticContent>
<system.webServer>

#3

@nampizda
you can look at Cannot download .json files

good luck.