I'm using IIS 7.5 and my goal to allow this one json
file as browsable however I don't want any other json
files to be accessible when navigating through the URL, therefore the typical IIS 404 page would appear.
I'm aware that you can allow all json
files using the MIME Types feature per site or virtual directory, but I can't seem to figure out how to allow just the one file.
Best Answer
In the web.config for your site, use something like this:
directly under the
<configuration>
node.Assuming you have not added a json mime type anywhere else, this should work. You specify this configuration for a specific url/file only.