ASP.Net JSON File Not Accessible From URL

404 - JSON File not found Error. The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.

September 14, 2020

IIS 7 does not provide access to files that are not added in <staticContent>

To provide access we have to give mappings in the configuration file.

Add below mentioned code (mappings) to web.config file.

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

Post Comments(0)

Leave a reply

Will not be displayed in comment box .

Loading...