Reputation: 553
I am trying to place pages in separate directories. I have set the web.config like this
<location path="AdminPanel">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
but when access the directory in the browers it lists all the pages in directory structure. What I am ddoing wrong?
Upvotes: 0
Views: 74
Reputation: 50728
The ASP.NET security can only block requests made by ASP.NET, so it can only block the content within the directory, not block you from accessing the directory structure itself. You need to disable directory browsing as @Claudio recommended to fix that problem, and your security will block access to the individual files in the folder.
Upvotes: 2