I have a directory where I am placing PDF files that are generated by my application. The issue is that since there are no aspx pages, the security in the web.config is not preventing direct navigation to those pdf's. Granted, the information is public, I just dont want someone to be able to go straight to them for a variety of reasons.
So the question is, how do I prevent access to that directory in a web.config file? here is what I have:
<configuration>
<appSettings/>
<connectionStrings/>
<system.web>
<authorization>
<allow roles="role1" />
<allow roles="role2" />
<allow roles="role3" />
<allow roles="role4" />
<deny users="*" />
</authorization>
</system.web>