I am developing a CDN server that is a normal MVC project. However, in the project folder, suppose I have CDN
folder, and I want everyone are allowed to access any files in there, with any file extension, and for CDN
folder only. That is, I don't want my web.config
file or Views
folder for example to be exposed.
Is there any way to do this without using a custom Controller
or RouteHandler
?
EDIT: As specified I am looking for a way in IIS or Web.config or somewhere else of writing code in Controller or RouteHandler, so it is not a duplicate.
Following David Gunderson answer, here is my web.config that allow CDN folder:
<location path="CDN">
<system.webServer>
<staticContent>
<mimeMap fileExtension="*" mimeType="application/octet-stream"/>
</staticContent>
</system.webServer>
</location>