authenticated user to particular folder in asp.net

I have ASP.NET web application hosted on asphostportal

I have to provide access to only authenticated users to a particular list of pdf kept in a folder "PdfFiles" in root directory.

I was trying below configuration settings in web.config, but it did not work, with this setting still this folder is accessible to all the users. I have form authenticated enabled for this site.

<location path="PdfFiles">
<system.web>
<authorization>
<deny users="?" />
<allow users="*"/>
</authorization>
</system.web>
</location>

Also I noticed that anonymous authentication was enabled for "PdfFiles" folder in IIS. If I disable this, it does not allow authenticated or anonymous, any of the user to access the pdfs.

So configuration change or IIS change, none of them worked. Can any one help me out on this issue?


closed account (48bpfSEw)
did you know www.google.com ? ^^ it is a SEARCH machine! ^^

http://weblogs.asp.net/gurusarkar/setting-authorization-rules-for-a-particular-page-or-folder-in-web-config

Topic archived. No new replies allowed.