In this small article i will tell you about mime type problem on Azure web apps. Some file types are not allowed to work by default. For example JSON files are not allowed to view or call. If you need to show or call by client you need to add the mime type. But main problem is Azure has not any setting blade on Web Apps. You need to configure manual with web.config file.
Create a file named web.config and past the below code :
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <staticContent> <mimeMap fileExtension=".json" mimeType="application/json" /> </staticContent> </system.webServer> </configuration>
Also you can raise the mime types with that code for other mime types.
Your site not need to be .NET based. You can use with static web app that code.
Finally upload to wwwroot folder and it will work!
Have a great Azures!