Authorization for Static Files in ASP.NET MVC w/ Owin
- IIS is serving static files , if you want to stop this you can remove default static file handler and than every request isserverd by MVC/OWIN.
- Than make static file handling and authorization in your controller: listen/map route where static files are located
to remove default static file handler add this to web.config file:
<configuration> <system.webServer> <handlers> <remove name="StaticFile" /> </handlers> </system.webServer></configuration>