December 2017
Beginner
372 pages
10h 32m
English
If you notice, we did copy the api folder so why is the application not able to find the JSON file? The reason here is because of how URL routing works on Windows. We need to explicitly define the file extensions which we want our web server to support, or else when the web server encounters any file with an extension it does not understand, the web server is not able to request the file.
To do that, we need to create a web.config file and have that file in our wwwroot folder. This file will have the mapping for the JSON extension as shown in the following screenshot:
<?xml version="1.0"?> <configuration><system.webServer><staticContent><mimeMap fileExtension=".json" mimeType="application/json" /></staticContent> ...
Read now
Unlock full access