Chetan
Chetan

Reputation: 489

Cant access a file from azure website

http://abcds.azurewebsites.net/scripts/abdsk.json

This file is available in the azure. But when i go to "http://abcds.azurewebsites.net/scripts/abdsk.json" i get a response back saying

GET http://abcds.azurewebsites.net/scripts/abdsk.json 404 (Not Found)

What might be the cause?

Upvotes: 1

Views: 101

Answers (1)

Rob Reagan
Rob Reagan

Reputation: 7696

By default, Azure won't serve certain file types. You have to explicitly include the MIME type in order for Azure to serve the file.

In your Web App's web.config, add the following in the section:

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

Upvotes: 6

Related Questions