I have a C# Webform application.
It contains a Report folder inside it Which contain some pdf files.
My application will show these reports on demand.
But I do not want someone to access these by typing the direct url
Eg: www.abc.com/Reports/a.pdf
I created the following Web.config inside the report folder:
<configuration>
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
Still, when testing I can access pdf files directly.
Also per business rules, I cannot use Form Authentication.