I have an ASP.NET MVC web project that has folders Controllers
, Views
, App_Data
, App_Start
etc. There is another folder called script
at the top level which has a foo.js
file.
When I run the website on IIS Express and access foo.js
via my browser making a http request, I can see the contents of the file on the browser i.e when I do localhost:8000/scripts/foo.js
. So I created another folder at the same level where this script
folder is and named it react
, and put a bar.js
file into to.
But when I navigate to localhost:8000/react/bar.js
, I get a HTTP Error 500.0 - Internal Server Error.
I've tried to search a lot what's going on, but couldn't make sense. Some say its a setting in web.config that restricts direct access to the file via IIS. Some say it is a configuration in IIS itself where certain folders are whitelisted for direct access other's are not Any help will be appreciated.