I have an application in mvc3 (asp.net 4.0, dotnet 4.0), running on iis8 (but it's also running on iis 7 and iis 7.5).
Within the application I have a folder called /dados
example localhost/minhaapp/dados
.
My clients save HTML files within this folder, and these HTML files are accessed by the system made in mvc3.
But users are accessing the files directly through the URL of the browser,
example localhost/minhaapp/dados/relatorio1.html
, instead
to access an internal system option made in mvc3.
- Can you block GET method access from the HTML files of
/dados
?
But I want the system made in mvc3 to be able to access these files via POST method. This is not the safest method, there must be many other possibilities, but if it does it would be fine.
I have tried various forms, rewrite, modules, urlmapping, mvc controler, etc., but neither of these forms captures the browser's request for static files. I know that static files are served directly by iis.
-
But is there any way for ASP.NET to intercept static file requests?
-
If it is not possible via ASP.NET, have some configuration that works on iss 8, 7.5 r 7?
I can not change to another folder, nor save the files in another way, that is, internal policies (the fact that this is already the case and is very widespread and used by multiple clients), how and where files are saved, It can not be changed.